mas-chen commented on code in PR #70: URL: https://github.com/apache/flink-connector-kafka/pull/70#discussion_r1491960996
########## flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/FlinkKafkaInternalProducer.java: ########## @@ -74,6 +76,10 @@ private static Properties withTransactionalId( @Override public Future<RecordMetadata> send(ProducerRecord<K, V> record, Callback callback) { + if (flushGated) { Review Comment: I don't think this helps because during a SinkWriter#flush(), a SinkWriter#write() cannot be invoked. So this boolean condition never occurs. For your issue, we are looking to replicate this behavior https://github.com/apache/flink-connector-kafka/blob/15f2662eccf461d9d539ed87a78c9851cd17fa43/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java#L1107 to ensure that all records are flushed before completing the checkpoint, even in the case of Kafka client timeouts/retries. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org