chihsuan commented on code in PR #11533:
URL: https://github.com/apache/ozone/pull/11533#discussion_r4271286476


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -825,6 +825,8 @@ private void evaluateKeyAndDirTable(OmBucketInfo bucket, 
long volumeObjId, Table
         long numKeysExpired = 0;
         HashSet<String> deletedKeySetInCache = new HashSet();
         HashSet<String> keySetInCache = new HashSet();
+        // Cache iteration is unordered, so lastScannedKey must only be set 
from the sorted table iteration below,
+        // otherwise a resumed scan could seek past table keys that were never 
evaluated.

Review Comment:
   nit: Could we clarify that even a sorted cache cannot represent table scan 
progress? Perhaps:
   
   ```suggestion
           // The cache is scanned separately before the table, so a cache key 
cannot represent table scan progress.
           // Only advance lastScannedKey during table iteration to avoid 
skipping unprocessed table keys on resume.
   ```



-- 
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]

Reply via email to