C0urante commented on code in PR #16784:
URL: https://github.com/apache/kafka/pull/16784#discussion_r1702362721
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java:
##########
@@ -2382,6 +2382,7 @@ DistributedHerderRequest addRequest(Callable<Void>
action, Callback<Void> callba
}
DistributedHerderRequest addRequest(long delayMs, Callable<Void> action,
Callback<Void> callback) {
+ callback.recordStage(tickThreadStage);
Review Comment:
Although this prevents stages recorded by other threads from being
overwritten, it does introduce a new risk that a tick thread stage gets
recorded after this line completes but before the request can be added to the
queue. I think this is still an improvement, and probably the best we can do
without synchronization.
--
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]