Skip to content

[9.3] Fix system index mapping update for reindexed indices after migration (#144782)#145025

Merged
alexey-ivanov-es merged 1 commit intoelastic:9.3from
alexey-ivanov-es:backport/9.3/pr-144782
Mar 26, 2026
Merged

[9.3] Fix system index mapping update for reindexed indices after migration (#144782)#145025
alexey-ivanov-es merged 1 commit intoelastic:9.3from
alexey-ivanov-es:backport/9.3/pr-144782

Conversation

@alexey-ivanov-es
Copy link
Contributor

Backports the following commits to 9.3:

…elastic#144782)

SystemIndexMappingUpdateService used projectMetadata.hasIndexAbstraction(d.getPrimaryIndex()) to collect system indices descriptors to check mappings, but then used state.metadata().index(descriptor.getPrimaryIndex()) to get IndexMetadata. This works with indices that were not reindexed, since their name is always the same as the system index's primary name, but after reindexing during migration, the index gains -reindexed-for-<version> suffix and has an alias with the primary name pointing to it. However, index method doesn't support aliases, therefore, IndexMetadata wasn't resolved and mappings were not checked.

This change fixes that by introducing use of indices lookup, if there is no metadata for the primary index.
@alexey-ivanov-es alexey-ivanov-es added :Core/Infra/System Indices >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Core/Infra Meta label for core/infra team labels Mar 26, 2026
@alexey-ivanov-es alexey-ivanov-es merged commit 566afee into elastic:9.3 Mar 26, 2026
35 of 36 checks passed
@alexey-ivanov-es alexey-ivanov-es deleted the backport/9.3/pr-144782 branch March 26, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Core/Infra/System Indices Team:Core/Infra Meta label for core/infra team v9.3.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants