aswinshakil commented on a change in pull request #2942:
URL: https://github.com/apache/ozone/pull/2942#discussion_r778367633



##########
File path: 
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconStorageContainerManagerFacade.java
##########
@@ -307,6 +327,109 @@ private void initializePipelinesFromScm() {
     }
   }
 
+  private void initializeSCMDB() {
+    try {
+      long scmContainersCount = scmServiceProvider.getSCMContainersCount();
+      long reconContainerCount = containerManager.getContainers().size();
+      long threshold = ozoneConfiguration.getInt(
+          ReconServerConfigKeys.OZONE_RECON_SCM_CONTAINER_THRESHOLD,
+          ReconServerConfigKeys.OZONE_RECON_SCM_CONTAINER_THRESHOLD_DEFAULT);
+
+      if(Math.abs(scmContainersCount - reconContainerCount) > threshold) {
+        updateReconSCMDBWithNewSnapshot();
+        LOG.info("Update Recon DB with SCM DB");

Review comment:
       Sure, I'll add it here




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