-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Mappings assertions in mixed clusters #59427
Copy link
Copy link
Closed
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field typesTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearch
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field typesTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearch
Type
Fields
Give feedbackNo fields configured for issues without a type.
We currently have a couple of internal checks on mappings updates which make it
difficult or impossible to change the default representation of mappings. IndexMetaData
objects have a mapping version on them, which is used for some sanity checking in
the translog, recoveries, CCR, etc. We also have an internal assertion that checks, when
doing a mapping update, that versions of the mapping with identical versions also have
identical serializations.
This constraint (that identical versions == identical representations) means that we cannot
change the default representation of a mapping, even if the parsed result of that representation
does not change. This has already prevented us from removing the (unused except for
serialization) type variable from a number of internal APIs (see #51214),
and is currently preventing a backport of some refactoring to the CompletionFieldMapper
because it no longer writes out some parameters if they hold default values.
One way around this would be to drop this assertion for mixed clusters only, but I worry that
this may let other subtle mapping bugs appear in mixed clusters, which by their nature are
full of edge cases that are difficult to test.