You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/01/18 15:54:40 UTC

[GitHub] [ozone] smengcl commented on a change in pull request #2972: HDDS-6135. SCM Container DB bootstrap on Recon startup for SCM HA.

smengcl commented on a change in pull request #2972:
URL: https://github.com/apache/ozone/pull/2972#discussion_r786897992



##########
File path: hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/StorageContainerServiceProviderImpl.java
##########
@@ -179,4 +185,38 @@ public DBCheckpoint getSCMDBSnapshot() {
     }
     return null;
   }
+
+  public DBCheckpoint getSCMDBSnapshotHA() throws IOException {

Review comment:
       Refactor this new method and `getSCMDBSnapshot()` to reduce code duplication.

##########
File path: hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconStorageContainerManagerFacade.java
##########
@@ -349,7 +350,13 @@ private void initializeSCMDB() {
   }
 
   public void updateReconSCMDBWithNewSnapshot() throws IOException {
-    DBCheckpoint dbSnapshot = scmServiceProvider.getSCMDBSnapshot();
+    DBCheckpoint dbSnapshot;
+    if(!SCMHAUtils.isSCMHAEnabled(ozoneConfiguration)) {

Review comment:
       nit
   ```suggestion
       if (!SCMHAUtils.isSCMHAEnabled(ozoneConfiguration)) {
   ```




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org