Optimize loading mappings when determining synthetic source usage and whether host.name can be sorted on#120055
Conversation
…xModeSettingsProvider Optimize mapping service usages in when determining synthetic source usage and assessing whether host.name field can be used for index sorting. This is done by excluding the part of the mapping we're not interested in.
|
Hi @martijnvg, I've created a changelog YAML for you. |
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
| for (CompressedXContent mappingSource : combinedTemplateMappings) { | ||
| var ref = mappingSource.compressedReference(); | ||
| var map = XContentHelper.convertToMap(ref, true, XContentType.JSON, MAPPING_INCLUDES, Set.of()).v2(); | ||
| processedTemplateMappings.add(new CompressedXContent(map)); |
There was a problem hiding this comment.
This is fairly cryptic. Can you add a comment above explaining the difference between processedTemplateMappings and combinedTemplateMappings?
|
Do we have enough testing coverage in the provider to capture all the interesting use cases where templates contain the interesting settings and fields? |
97e4775 to
ace4d23
Compare
I think the unit test coverage in |
kkrik-es
left a comment
There was a problem hiding this comment.
Please double check testing coverage.
…ettingsProvider_2
…name settings with various mappings
💚 Backport successful
|
Optimize mapping service usages in when determining synthetic source usage and assessing whether host.name field can be used for index sorting. This is done by excluding the part of the mapping we're not interested in.
This replaces #119935 and addresses the problem differently, by just loading the parts of the mapping
LogsdbIndexModeSettingsProvideris interested in and by this lowering the overhead of parsing/merging mappings that has been reported via #119552