dombizita commented on code in PR #3821:
URL: https://github.com/apache/ozone/pull/3821#discussion_r1011733525


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java:
##########
@@ -255,6 +265,22 @@ public void start() {
         TimeUnit.MILLISECONDS);
   }
 
+  private void stopSyncDataFromOMThread() {
+    scheduler.shutdownNow();

Review Comment:
   Previously in the `startSyncDataFromOM` method there is a 
`scheduler.scheduleWithFixedDelay`, which is doing this based (copied from the 
documentation):
   ```
   Creates and executes a periodic action that becomes enabled first
   after the given initial delay, and subsequently with the
   given delay between the termination of one execution and the
   commencement of the next.  If any execution of the task
   encounters an exception, subsequent executions are suppressed.
   Otherwise, the task will only terminate via cancellation or
   termination of the executor.
   ```
   Because of this there will always be a `syncDataFromOM()` scheduled with the 
declared delay, so the `shutdownNow()` method will return that. 



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