tzulitai commented on code in PR #46:
URL: 
https://github.com/apache/flink-connector-kafka/pull/46#discussion_r1317636517


##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaWriter.java:
##########
@@ -104,9 +103,10 @@ class KafkaWriter<IN>
     // producer pool only used for exactly once
     private final Deque<FlinkKafkaInternalProducer<byte[], byte[]>> 
producerPool =
             new ArrayDeque<>();
-    private final Closer closer = Closer.create();
     private long lastCheckpointId;
 
+    private final Set<AutoCloseable> closeables = new HashSet<>();

Review Comment:
   Also, should this be a `Queue` / `List` instead? Here we never want actual 
implementation of the producer object's equality check to interfere here and 
leave room to potentially have a producer left unclosed.



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

Reply via email to