Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unstable Assertion in IndexMetadataUpdater#applyChanges (#86159) #87649

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

original-brownbear
Copy link
Member

This assertion here isn't stable unfortunately even though it would be nice to assert this. The problem is that the same cluster
state instance that is updated here might be concurrently used and the index lookup could have been created in it while we update
index metadata (from all kinds of actions that set it up).
I don't see a way to stabilize it that would actually be safe since the index lookup is cached in Metadata on a best effort basis
and we can't read the field on an instance of Metadata in a manner that would deterministically that a subsequent read
returns the same value.

-> removing the assertion

closes #86090

backport of #86159

…ic#86159)

This assertion here isn't stable unfortunately even though it would be nice to assert this. The problem is that the same cluster
state instance that is updated here might be concurrently used and the index lookup could have been created in it while we update
index metadata (from all kinds of actions that set it up).
I don't see a way to stabilize it that would actually be safe since the index lookup is cached in `Metadata` on a best effort basis
and we can't read the field on an instance of `Metadata` in a manner that would deterministically that a subsequent read
returns the same value.

-> removing the assertion

closes elastic#86090
@original-brownbear original-brownbear added :Data Management/Indices APIs APIs to create and manage indices and templates backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Jun 14, 2022
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Jun 14, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

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 :Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team v8.2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants