kerneltime commented on code in PR #3534:
URL: https://github.com/apache/ozone/pull/3534#discussion_r918577167


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/upgrade/BasicUpgradeFinalizer.java:
##########
@@ -82,29 +84,36 @@ public StatusAndMessages finalize(String upgradeClientID, T 
service)
     // sets the finalization status to FINALIZATION_IN_PROGRESS.
     // Therefore, a lock is used to make sure only one finalization thread is
     // running at a time.
-    StatusAndMessages response = initFinalize(upgradeClientID, service);
-    if (finalizationLock.tryLock()) {
+    if (isFinalized(versionManager.getUpgradeState())) {
+      return FINALIZED_MSG;
+    } else if (finalizationLock.tryLock()) {

Review Comment:
   ```suggestion
       } 
       if (finalizationLock.tryLock()) {
   ```
   



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