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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -239,38 +294,72 @@ private Pair<Pair<Integer, Long>, Boolean> 
submitPurgeKeysRequest(
       }
     }
 
-    if (purgeKeys.isEmpty() && keysToUpdateList.isEmpty() &&
+    if (purgedKeyList.isEmpty() && keysToUpdateList.isEmpty() &&
         (renameEntriesToBeDeleted == null || 
renameEntriesToBeDeleted.isEmpty())) {
       return Pair.of(Pair.of(deletedCount, deletedReplSize), purgeSuccess);
     }
 
     int purgeKeyIndex = 0, updateIndex = 0, renameIndex = 0;
     PurgeKeysRequest.Builder requestBuilder = 
getPurgeKeysRequest(snapTableKey, expectedPreviousSnapshotId);
-    int currSize = requestBuilder.build().getSerializedSize();
-    int baseSize = currSize;
+    AtomicInteger currSize = new 
AtomicInteger(requestBuilder.build().getSerializedSize());

Review Comment:
   I was using this for computeIfAbsent initially. Now that the method has been 
abstracted out we don't have to keep it atomic anymore.



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