jojochuang commented on code in PR #11577:
URL: https://github.com/apache/ozone/pull/11577#discussion_r4344951209


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/OmSnapshotLocalDataManager.java:
##########
@@ -459,12 +459,18 @@ private void init(OzoneConfiguration configuration, 
SnapshotChainManager chainMa
 
   }
 
-  private void checkOrphanSnapshotVersions(OMMetadataManager metadataManager, 
SnapshotChainManager chainManager)
-      throws IOException {
+  @VisibleForTesting
+  void checkOrphanSnapshotVersions(OMMetadataManager metadataManager, 
SnapshotChainManager chainManager) {
     for (Map.Entry<UUID, Integer> entry : 
snapshotToBeCheckedForOrphans.entrySet()) {
       UUID snapshotId = entry.getKey();
       int countBeforeCheck = entry.getValue();
-      checkOrphanSnapshotVersions(metadataManager, chainManager, snapshotId);
+      try {
+        checkOrphanSnapshotVersions(metadataManager, chainManager, snapshotId);

Review Comment:
   this method itself is good if it's single threaded (which it is), otherwise 
it can introduce race conditions)



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