varkey98 commented on code in PR #355:
URL:
https://github.com/apache/flink-connector-kafka/pull/355#discussion_r4773639950
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaWriter.java:
##########
@@ -201,13 +207,30 @@ public List<KafkaWriterState> snapshotState(long
checkpointId) throws IOExceptio
public void close() throws Exception {
markClosed();
LOG.debug("Closing writer with {}", currentProducer);
- closeAll(currentProducer);
- checkState(
- currentProducer.isClosed(), "Could not close current producer
" + currentProducer);
- currentProducer = null;
+ Exception failure = null;
+ try {
+ closeAll(currentProducer, recordSerializer::close);
+ checkState(
Review Comment:
Thanks, have updated it, ptal.
--
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]