You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/05/04 16:53:57 UTC

[GitHub] [kafka] C0urante commented on a change in pull request #8069: KAFKA-9374: Make connector interactions asynchronous

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



##########
File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/HerderConnectorContext.java
##########
@@ -16,30 +16,64 @@
  */
 package org.apache.kafka.connect.runtime;
 
-import org.apache.kafka.connect.connector.ConnectorContext;
+import org.apache.kafka.connect.errors.ConnectException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * ConnectorContext for use with a Herder
  */
-public class HerderConnectorContext implements ConnectorContext {
+public class HerderConnectorContext implements CloseableConnectorContext {
+
+    private static final Logger log = LoggerFactory.getLogger(HerderConnectorContext.class);
 
     private final AbstractHerder herder;
     private final String connectorName;
+    private volatile boolean closed;
 
     public HerderConnectorContext(AbstractHerder herder, String connectorName) {
         this.herder = herder;
         this.connectorName = connectorName;
+        this.closed = false;
     }
 
     @Override
     public void requestTaskReconfiguration() {
+        synchronized (this) {

Review comment:
       Ah, good point. No need, will remove the locking.




----------------------------------------------------------------
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:
users@infra.apache.org