ss77892 opened a new pull request, #11050:
URL: https://github.com/apache/ozone/pull/11050
## What changes were proposed in this pull request?
HDDS-16209. KeyLifecycleService leaks inFlight entry when a task runswhile
shouldRun() is false, permanently blocking the bucket
KeyLifecycleService registers a bucket in the inFlight map when a
LifecycleActionTask is scheduled, and removes it when the task finishes
scanning. However, if the service is suspended, disabled, or loses OM
leadership between scheduling and execution, LifecycleActionTask.call() returns
early because shouldRun() is false, without removing the bucket from inFlight.
Since nothing else ever clears that entry, every subsequent getTasks() cycle
skips the bucket as "already running", so lifecycle actions for that bucket are
permanently blocked until the OM restarts.
The fix adds an else branch in LifecycleActionTask.call(): when
shouldRun() is false and the scan is skipped, the bucket's inFlight
registration is removed so the bucket can be scheduled again on the next cycle.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16209
## How was this patch tested?
Unit test has been added to reproduce the scenario. Passed with the fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]