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


##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaWriter.java:
##########
@@ -245,12 +245,12 @@ public void close() throws Exception {
         LOG.debug("Closing writer with {}", currentProducer);
         closeAll(
                 this::abortCurrentProducer,
-                closer,
                 producerPool::clear,
                 () -> {
                     checkState(currentProducer.isClosed());
                     currentProducer = null;
                 });
+        closeAll(closeables);

Review Comment:
   I do not think that the closing order has any correctness implications here. 
If you prefer, I can keep the original ordering, just in case.



##########
flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/sink/FlinkKafkaInternalProducerITCase.java:
##########
@@ -173,9 +172,10 @@ private static Properties getProperties() {
     }
 
     private static List<Consumer<FlinkKafkaInternalProducer<?, ?>>> 
provideTransactionsFinalizer() {
-        return Lists.newArrayList(
-                FlinkKafkaInternalProducer::commitTransaction,
-                FlinkKafkaInternalProducer::abortTransaction);
+        List<Consumer<FlinkKafkaInternalProducer<?, ?>>> ret = new 
ArrayList<>();
+        ret.add(FlinkKafkaInternalProducer::commitTransaction);
+        ret.add(FlinkKafkaInternalProducer::abortTransaction);

Review Comment:
   Done in 731fc35b2f0204f162044950abcdcfde570f12ef



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