In #78427 and #78246, in some cases it would duplicate submitStateUpdateTask. and using Set<IndexLifecycleClusterStateUpdateTask> to prevent duplicate submit.
But, on rare occasions, when there is a exception occured like IllegalStateException("unable to parse steps for policy [" + policy + "] as it doesn't exist"); throwed from PolicyStepsRegistry#parseStepsFromPhase and every time occured, the wrapper in IndexLifecycleRunner#markPolicyRetrievalError always create a new instance.
so when Set<IndexLifecycleClusterStateUpdateTask> verify task like SetStepInfoUpdateTask it would duplicate added into Set<IndexLifecycleClusterStateUpdateTask> because SetStepInfoUpdateTask#ExceptionWrapper as stepInfo do not have method to verify as equals
Steps to Reproduce
Stop ILM
Delete some policy
Start ILM
When get pending tasks shows many duplicated tasks with steps: ilm-set-step-info
Elasticsearch Version
master
Installed Plugins
null
Java Version
bundled
OS Version
Unix
Problem Description
PR: #89832
In #78427 and #78246, in some cases it would duplicate
submitStateUpdateTask
. and usingSet<IndexLifecycleClusterStateUpdateTask>
to prevent duplicate submit.But, on rare occasions, when there is a exception occured like
IllegalStateException("unable to parse steps for policy [" + policy + "] as it doesn't exist");
throwed fromPolicyStepsRegistry#parseStepsFromPhase
and every time occured, the wrapper inIndexLifecycleRunner#markPolicyRetrievalError
always create a new instance.so when
Set<IndexLifecycleClusterStateUpdateTask>
verify task likeSetStepInfoUpdateTask
it would duplicate added intoSet<IndexLifecycleClusterStateUpdateTask>
becauseSetStepInfoUpdateTask#ExceptionWrapper
asstepInfo
do not have method to verify as equalsSteps to Reproduce
Stop ILM Delete some policy Start ILM
When get pending tasks shows many duplicated tasks with steps:
ilm-set-step-info
and using arthas shows info
and with different stepInfo object
Logs (if relevant)
No response