Savonitar commented on code in PR #214:
URL:
https://github.com/apache/flink-connector-kafka/pull/214#discussion_r2705901812
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaWriter.java:
##########
@@ -306,27 +309,42 @@ public WriterCallback(
@Override
public void onCompletion(RecordMetadata metadata, Exception exception)
{
if (exception != null) {
- FlinkKafkaInternalProducer<byte[], byte[]> producer =
- KafkaWriter.this.currentProducer;
+ if (closed) {
Review Comment:
Maybe I'm wrong, but I ran the tests with thread logging and found that
while all `KafkaWriter` public methods run on the main/mailbox thread, the
`onCompletion()` callback runs on "kafka-producer-network-thread | producer-1".
And `closed` variable is used in `onCompletion()` and `close()` methods.
--
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]