yashmayya commented on code in PR #13806:
URL: https://github.com/apache/kafka/pull/13806#discussion_r1216948753


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java:
##########
@@ -2212,6 +2212,13 @@ DistributedHerderRequest addRequest(Callable<Void> 
action, Callback<Void> callba
     DistributedHerderRequest addRequest(long delayMs, Callable<Void> action, 
Callback<Void> callback) {
         DistributedHerderRequest req = new 
DistributedHerderRequest(time.milliseconds() + delayMs, 
requestSeqNum.incrementAndGet(), action, callback);
         requests.add(req);
+        // We don't need to synchronize here
+        // If the condition evaluates to true, we can and should trigger a 
wakeup
+        // If it evaluates to false because our request has suddenly been 
popped off of the queue, then
+        //     the herder is already running the request and no wakeup is 
necessary

Review Comment:
   nit: unnecessary indentation?



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to