Open DaveCTurner opened 2 years ago
Pinging @elastic/es-search (Team:Search)
I think we can do this relatively simply by replacing the call to MapperService.merge()
with a call to MapperService.updateMapping()
, which already has some sanity checks to ensure that we don't needlessly apply updates when the mapping hasn't actually changed.
Alan tried to fix this but realized that we do need this validation because of analyzers that may have changed and are outside of the mappings but part of index settings.
Pinging @elastic/es-search-foundations (Team:Search Foundations)
Updating index settings on a large number of indices can take many minutes and the resulting cluster state update might fail to cleanly publish without warning. A significant part of this slowness is that the index metadata validation that is run for each index. This validation deserialises + reserializes the mapping for every index that got updated, which for large mappings combined with a large number of updates indices can take many minutes.
We should find a way to skip unnecessary mapping validation when nothing about the mappings has changed, and to make use of mapping deduplication here too.
Relates #77466 Extracted from #87120