You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "yashmayya (via GitHub)" <gi...@apache.org> on 2023/06/04 17:46:39 UTC

[GitHub] [kafka] yashmayya commented on a diff in pull request #13806: MINOR: Fix flaky DistributedHerderTest cases related to zombie fencing

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-unsubscribe@kafka.apache.org

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