Fix shadowing ts param in non ts mappings#141549
Fix shadowing ts param in non ts mappings#141549elasticsearchmachine merged 13 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
|
Hi @gmarouli, I've created a changelog YAML for you. |
| @@ -598,10 +598,10 @@ public boolean useTimeSeriesDocValuesCodec() { | |||
| */ | |||
| public static IndexMode fromString(String value) { | |||
| return switch (value) { | |||
There was a problem hiding this comment.
Use value.toLowerCase to play it safe?
| List<ObjectMapper> objectMappers, | ||
| List<RuntimeField> runtimeFields | ||
| ) { | ||
| return createMappingLookup(fieldMappers, objectMappers, runtimeFields, randomFrom(IndexMode.values())); |
There was a problem hiding this comment.
I wonder if this will lead to all sorts of failures, e.g. because there's no dimension and no routing path set. Maybe set to standard by default?
There was a problem hiding this comment.
The index mode is not used anywhere else yet apart from shadowing. This is why I did not default to standard, because it's a fail-safe that we are not interfering with anything else. Do you agree that since it shouldn't matter, we can leave it random?
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes elastic#140882
💔 Backport failed
You can use sqren/backport to manually backport by running |
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes #140882
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes elastic#140882 (cherry picked from commit e9bd294) # Conflicts: # server/src/test/java/org/elasticsearch/search/SearchServiceTests.java # server/src/test/java/org/elasticsearch/search/diversification/DiversifyRetrieverBuilderTests.java
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes elastic#140882 (cherry picked from commit e9bd294) # Conflicts: # server/src/test/java/org/elasticsearch/search/SearchServiceTests.java # server/src/test/java/org/elasticsearch/search/diversification/DiversifyRetrieverBuilderTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetBitsetCacheTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexReaderWrapperIntegrationTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/planner/EsPhysicalOperationProvidersTests.java
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes elastic#140882 (cherry picked from commit e9bd294) # Conflicts: # rest-api-spec/build.gradle # server/src/main/java/org/elasticsearch/index/IndexFeatures.java # server/src/test/java/org/elasticsearch/search/SearchServiceTests.java # server/src/test/java/org/elasticsearch/search/diversification/DiversifyRetrieverBuilderTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetBitsetCacheTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexReaderWrapperIntegrationTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/planner/EsPhysicalOperationProvidersTests.java
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes elastic#140882
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes #140882 (cherry picked from commit e9bd294) # Conflicts: # server/src/test/java/org/elasticsearch/search/SearchServiceTests.java # server/src/test/java/org/elasticsearch/search/diversification/DiversifyRetrieverBuilderTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetBitsetCacheTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexReaderWrapperIntegrationTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/planner/EsPhysicalOperationProvidersTests.java
* Fix shadowing ts param in non ts mappings (#141549) Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes #140882 (cherry picked from commit e9bd294) # Conflicts: # rest-api-spec/build.gradle # server/src/main/java/org/elasticsearch/index/IndexFeatures.java # server/src/test/java/org/elasticsearch/search/SearchServiceTests.java # server/src/test/java/org/elasticsearch/search/diversification/DiversifyRetrieverBuilderTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetBitsetCacheTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexReaderWrapperIntegrationTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/planner/EsPhysicalOperationProvidersTests.java * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields. Fixes #140882 (cherry picked from commit e9bd294) # Conflicts: # server/src/test/java/org/elasticsearch/search/SearchServiceTests.java # server/src/test/java/org/elasticsearch/search/diversification/DiversifyRetrieverBuilderTests.java
Runtime fields are not allowed to shadow time series metrics and dimensions in a time series index. However, shadowing metrics and dimensions in non time series indices should be valid because they behave like regular fields.
Fixes #140882