Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate resolution loss on date field #78921

Merged

Conversation

pgomulka
Copy link
Contributor

@pgomulka pgomulka commented Oct 11, 2021

When stroing nanoseconds on a date field the nanosecond part is lost as
it cannot be stored. The date_nanos field should be used instead.
This commit emits a deprecation warning to notify users about this.

closes #37962

When stroing nanoseconds on a date field the nanosecond part is lost as
it cannot be stored. The date_nanos field should be used instead.
This commit emits a deprecation warning to notify users about this.
@pgomulka pgomulka added :Search Foundations/Mapping Index mappings, including merging and defining field types :Core/Infra/Core Core issues without another label v8.0.0 v7.16.0 labels Oct 11, 2021
@pgomulka pgomulka self-assigned this Oct 11, 2021
@elasticmachine elasticmachine added Team:Core/Infra Meta label for core/infra team Team:Search Meta label for search team labels Oct 11, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@pgomulka
Copy link
Contributor Author

this will be followed up by a an exception being thrown in ES 8.0

@pgomulka pgomulka marked this pull request as draft October 11, 2021 15:12
@pgomulka
Copy link
Contributor Author

moving to draft, because this needs more rework as just checking in DateFieldMapper affects search wich is using rounding (which will add a nanoseconds to a date field with millis resolution)

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pgomulka pgomulka merged commit d50c9e8 into elastic:master Oct 18, 2021
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Oct 18, 2021
When storing nanoseconds on a date field the nanosecond part is lost as
it cannot be stored. The date_nanos field should be used instead.
This commit emits a deprecation warning to notify users about this.

closes elastic#37962
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Oct 18, 2021
* upstream/master:
  Changing test keytab to use aes256-cts-hmac-sha1-96 instead of des3-cbc-sha1-kd (elastic#78703)
  Add support for configuring HNSW parameters (elastic#79193)
  Deprecate resolution loss on date field (elastic#78921)
  Add Optional to Configure bind user (elastic#78303)
  Adapt BWC after backporting elastic#78765 (elastic#79350)
  [DOCS] Add deprecation notice for reset password tool (elastic#78793)
  added test for flattened type in top_metrics.yml (elastic#78960)
  [DOCS] Fixes indentation issue in GET trained models API docs. (elastic#79347)
  Fix parsing of PBES2 encrypted PKCS#8 keys (elastic#78904)
  Mute testReindex (elastic#79343)
  Node level can match action (elastic#78765)
  Fix duplicate license header in source files (elastic#79236)
  AllowAll for indicesAccessControl (elastic#78498)
  Better logging and internal user handling for operator privileges (elastic#79331)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/mapper/MappingParser.java
pgomulka added a commit that referenced this pull request Oct 18, 2021
When storing nanoseconds on a date field the nanosecond part is lost as
it cannot be stored. The date_nanos field should be used instead.
This commit emits a deprecation warning to notify users about this.

closes #37962
backports #78921
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Oct 18, 2021
@masseyke masseyke mentioned this pull request Oct 19, 2021
masseyke added a commit that referenced this pull request Oct 19, 2021
As #79107 of the ESTestCase assertWarnings methods now check that the log level is of the expected type. This commit
puts in the correct expected log level.
Relates #79107 #78921
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Oct 20, 2021
pgomulka added a commit that referenced this pull request Oct 20, 2021
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Oct 21, 2021
pgomulka added a commit that referenced this pull request Oct 21, 2021
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Oct 27, 2021
pgomulka added a commit that referenced this pull request Oct 28, 2021
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Oct 28, 2021
pgomulka added a commit that referenced this pull request Oct 28, 2021
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Oct 28, 2021
…formance

* upstream/master: (153 commits)
  [ML] update truncation default & adding field output when input is truncated (elastic#79942)
  [ML] stop using isAllowedByLicense for model license checks (elastic#79908)
  [ML] Retain built-in ML roles granting Kibana privileges (elastic#80014)
  [Transform] remove old mixed cluster BWC layers, not required for 8x (elastic#79927)
  Increase test timeout for CoordinatorTests testAllSearchesExecuted
  [Transform] add rolling upgrade tests for upgrade endpoint (elastic#79721)
  [ML] Update trained model docs for truncate parameter for bert tokenization (elastic#79652)
  `CoordinatorTests` sometimes needs three term bumps (elastic#79574)
  [ML] Account for service being triggered twice in tests (elastic#80000)
  SearchContext: remove unused variable (elastic#79917)
  Revert "Deprecate resolution loss on date field (elastic#78921)" (elastic#79914)
  Re-enable GeoIpDownloaderIT#testStartWithNoDatabases() (elastic#79907)
  Fix SnapshotBasedIndexRecoveryIT#testSeqNoBasedRecoveryIsUsedAfterPrimaryFailOver (elastic#79469)
  Fix RecoverySourceHandlerTests (elastic#79546)
  SQL: stabilize SqlSearchPageTimeoutIT (elastic#79928)
  Wait 3 seconds for the server to reload trust (elastic#79778)
  Skip automatically preserved request headers when rewriting (elastic#79973)
  Check whether stdout is a real console (elastic#79882)
  Convert remote license checker to use LicensedFeature (elastic#79876)
  Miscellaneous fixes for LDAP SDK v6 upgrade (elastic#79891)
  ...

# Conflicts:
#	libs/x-content/src/main/java/org/elasticsearch/xcontent/support/filtering/FilterPath.java
#	libs/x-content/src/test/java/org/elasticsearch/xcontent/support/filtering/FilterPathGeneratorFilteringTests.java
#	libs/x-content/src/test/java/org/elasticsearch/xcontent/support/filtering/FilterPathTests.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >non-issue :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Core/Infra Meta label for core/infra team Team:Search Meta label for search team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dates stored in milliseconds can be passed with higher resolution losing precision
5 participants