priyeshkaratha commented on code in PR #12030:
URL: https://github.com/apache/ozone/pull/12030#discussion_r4597442493
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
Review Comment:
After policyChanged is set, nothing more is deleted, but the loop still
reads every remaining key in the directory. In a large FSO directory this can
take a long time, and the task for the new configuration can't start until it
finishes. Suspend, disable, and leader change have the same delay, because this
loop doesn't check shouldRun() either.
```suggestion
if (!shouldContinue(bucketName)) {
return;
}
if (shouldSaveState()) {
LOG.info("Saving scan state for bucket {} at key {}",
bucketName, lastScannedKey);
flushAndSaveState(bucket, keyList, dirList, scanStateBuilder);
}
```
--
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]