yihua commented on a change in pull request #4021: URL: https://github.com/apache/hudi/pull/4021#discussion_r756185388
########## File path: hudi-kafka-connect/src/main/java/org/apache/hudi/connect/transaction/ConnectTransactionParticipant.java ########## @@ -215,13 +215,17 @@ private void writeRecords() { try { SinkRecord record = buffer.peek(); if (record != null - && record.kafkaOffset() >= ongoingTransactionInfo.getLastWrittenKafkaOffset()) { + && record.kafkaOffset() == ongoingTransactionInfo.getExpectedKafkaOffset()) { Review comment: This assumes that the records come in order in terms of the Kafka offset from the buffer. Is it possible that the records may come out of order? -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org