showuon commented on a change in pull request #11413: URL: https://github.com/apache/kafka/pull/11413#discussion_r734370453
########## File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java ########## @@ -550,16 +552,16 @@ public boolean commitOffsets() { // Now we can actually flush the offsets to user storage. Future<Void> flushFuture = offsetWriter.doFlush((error, result) -> { if (error != null) { + // Very rare case: offsets were unserializable, and unable to store any data log.error("{} Failed to flush offsets to storage: ", WorkerSourceTask.this, error); + finishFailedFlush(); + recordCommitFailure(time.milliseconds() - started, error); Review comment: `doFlush` will return `null` after calling the callback with error attached. Handle the failed flush here, since we can know which error is thrown. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org