tzulitai commented on code in PR #46:
URL:
https://github.com/apache/flink-connector-kafka/pull/46#discussion_r1317627531
##########
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:
Actually I think there is, because of the
`checkState(currentProducer.isClosed())` in the first `closeAll` above.
The `closeables` need to be closed first, for that check to pass. I'm
surprised that no unit tests test the `close` method though, that would have
failed.
--
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]