jasonosullivan34 commented on code in PR #9842:
URL: https://github.com/apache/ozone/pull/9842#discussion_r2980475319


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconStorageContainerManagerFacade.java:
##########
@@ -534,72 +538,13 @@ public void updateReconSCMDBWithNewSnapshot() throws 
IOException {
   }
 
   public boolean syncWithSCMContainerInfo()
-      throws IOException {
+      throws Exception {
     if (isSyncDataFromSCMRunning.compareAndSet(false, true)) {

Review Comment:
   This guard is already present on the schedule calling this method. Shall I 
push this logic into the syncWithSCMContainerInfo method to make it cleaner?
   
   ```
       // This periodic sync with SCM container cache is needed because during
       // the window when recon will be down and any container being added
       // newly and went missing, that container will not be reported as 
missing by
       // recon till there is a difference of container count equivalent to
       // threshold value defined in "ozone.recon.scm.container.threshold"
       // between SCM container cache and recon container cache.
       scheduler.scheduleWithFixedDelay(() -> {
         try {
           boolean isSuccess = syncWithSCMContainerInfo();
           if (!isSuccess) {
             LOG.debug("SCM container info sync is already running.");
           }
         } catch (Throwable t) {
           LOG.error("Unexpected exception while syncing data from SCM.", t);
         } finally {
           isSyncDataFromSCMRunning.compareAndSet(true, false);
         }
       },
           initialDelay,
           interval,
           TimeUnit.MILLISECONDS);
   ``` 



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