kkonstantine commented on a change in pull request #8069:
URL: https://github.com/apache/kafka/pull/8069#discussion_r420919710



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConnector.java
##########
@@ -266,31 +422,51 @@ public void close() {
         @Override
         public void onStartup(String connector) {
             state = AbstractStatus.State.RUNNING;
-            delegate.onStartup(connector);
+            synchronized (this) {

Review comment:
       I don't think locking buys you anything w/r/t to that. The producer#send 
in the status backing store is asynchronous. So what would describe above can 
happen anyways, regardless of whether you lock this object. 
   
   Of course, if it wasn't asynchronous things would be much worse. A 
bottleneck would be created by the lock, waiting for the `send` to finish in 
every locked block, so that's not an option. Wdyt? 
   That's what I see at the high level without spending to much time on it, but 
see if you can check this assumption and we can return to this question. 




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

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


Reply via email to