Skip to content

Commit 19ecdd3

Browse files
committed
Add a note about a race condition
1 parent 4954725 commit 19ecdd3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/PolicyStepsRegistry.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ public LifecyclePolicyMetadata read(StreamInput in, String key) {
172172
* policy changes, but in a long-lived cluster that doesn't happen to experience
173173
* either of those events (and where indices are removed regularly) we still want
174174
* the cache to trim deleted indices.
175+
*
176+
* n.b. even with this, there's still a pretty small chance that a given index
177+
* could leak, if we're right in the middle of populating the cache for that
178+
* index (in getStep) when we process the delete here, then we'll end up with an
179+
* entry that doesn't get deleted until the master changes or a policy changes
180+
* -- it's harmless enough
175181
*/
176182
public void delete(Index deleted) {
177183
cachedSteps.remove(deleted);

0 commit comments

Comments
 (0)