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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManager.java:
##########
@@ -302,10 +302,8 @@ private void 
testBlockDeletionTransactions(MiniOzoneCluster cluster) throws Exce
     // eventually these TX will success.
     GenericTestUtils.waitFor(() -> {
       try {
-        if (SCMHAUtils.isSCMHAEnabled(cluster.getConf())) {
-          cluster.getStorageContainerManager().getScmHAManager()
-              .asSCMHADBTransactionBuffer().flush();
-        }
+        cluster.getStorageContainerManager().getScmHAManager()
+            .asSCMHADBTransactionBuffer().flush();

Review Comment:
   use getDBTransactionBuffer() instead.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java:
##########
@@ -387,7 +384,7 @@ private StorageContainerManager(OzoneConfiguration conf,
     threadNamePrefix = getScmNodeDetails().threadNamePrefix();
     primaryScmNodeId = scmStorageConfig.getPrimaryScmNodeId();
 
-    jvmPauseMonitor = !ratisEnabled ? newJvmPauseMonitor(getScmId()) : null;
+    jvmPauseMonitor = newJvmPauseMonitor(getScmId());

Review Comment:
   to be consistent, jvmPauseMonitor should be made null.
   In fact, we can simply remove jvmPauseMonitor, and let the JVM pause monitor 
thread in Ratis run.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java:
##########
@@ -362,15 +362,12 @@ private StorageContainerManager(OzoneConfiguration conf,
     initMetrics();
     initPerfMetrics();
 
-    boolean ratisEnabled = SCMHAUtils.isSCMHAEnabled(conf);
     if (scmStorageConfig.getState() != StorageState.INITIALIZED) {
       String errMsg = "Please make sure you have run 'ozone scm --init' " +
           "command to generate all the required metadata to " +
-          scmStorageConfig.getStorageDir();
-      if (ratisEnabled && !scmStorageConfig.isSCMHAEnabled()) {

Review Comment:
   If storage not initialized, the HA property would not be set and therefore 
scmStorageConfig.isSCMHAEnabled() would evaluate to false. Correct?



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAManagerImpl.java:
##########
@@ -180,9 +171,7 @@ public SCMSnapshotProvider getSCMSnapshotProvider() {
 
   @Override
   public SCMHADBTransactionBuffer asSCMHADBTransactionBuffer() {

Review Comment:
   remove this method because it's the same as getDBTransactionBuffer().



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