Skip to content

[8.x] Fix PolicyStepsRegistry cache concurrency issue (#126840) #126913

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

Merged
merged 2 commits into from
Apr 17, 2025

Conversation

nielsbauman
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

The following order of events was possible:
- An ILM policy update cleared `cachedSteps`
- ILM retrieves the step definition for an index, this populates `cachedSteps` with the outdated policy
- The updated policy is put in `lifecyclePolicyMap`

Any subsequent cache retrievals will see the old step definition.

By clearing `cachedSteps` _after_ we update `lifecyclePolicyMap`, we
ensure eventual consistency between the policy and the cache.

Fixes elastic#118406

(cherry picked from commit 5383f0f)

# Conflicts:
#	muted-tests.yml
@nielsbauman nielsbauman added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Data Management/ILM+SLM Index and Snapshot lifecycle management >bug Team:Data Management Meta label for data/management team labels Apr 16, 2025
@elasticsearchmachine elasticsearchmachine merged commit 04cb4e7 into elastic:8.x Apr 17, 2025
15 checks passed
@nielsbauman nielsbauman deleted the backport/8.x/pr-126840 branch April 17, 2025 11:33
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 :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants