adoroszlai commented on code in PR #9942:
URL: https://github.com/apache/ozone/pull/9942#discussion_r2958714852


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/ThrottledAsyncChecker.java:
##########
@@ -117,39 +117,41 @@ public ThrottledAsyncChecker(final Timer timer,
   @Override
   public Optional<ListenableFuture<V>> schedule(
       Checkable<K, V> target, K context) {
-    if (checksInProgress.containsKey(target)) {
-      return Optional.empty();
-    }
+    synchronized (ThrottledAsyncChecker.this) {
+      if (checksInProgress.containsKey(target)) {

Review Comment:
   Agree.  The callback uses `synchronized (ThrottledAsyncChecker.this)` only 
because it is a different object.  Here we can simplify as @Gargi-jais11 
suggested.



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