swamirishi commented on code in PR #6024:
URL: https://github.com/apache/ozone/pull/6024#discussion_r1480359691


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java:
##########
@@ -237,8 +242,9 @@ private synchronized void cleanup() {
    * TODO: [SNAPSHOT] Add new ozone debug CLI command to trigger this directly.
    */
   private void cleanupInternal() {
-    for (Map.Entry<String, ReferenceCounted<IOmMetadataReader, SnapshotCache>> 
entry : dbMap.entrySet()) {
-      dbMap.compute(entry.getKey(), (k, v) -> {
+    for (String evictionKey : pendingEvictionQueue) {
+      dbMap.compute(evictionKey, (k, v) -> {
+        pendingEvictionQueue.remove(k);

Review Comment:
   this should be fine, since this is a concurrent hashset.



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