dajac commented on code in PR #14981: URL: https://github.com/apache/kafka/pull/14981#discussion_r1424350465
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java: ########## @@ -698,13 +720,27 @@ public void run() { producerEpoch, result.records() ); - context.coordinator.updateLastWrittenOffset(offset); + + timer.add(new TimerTask(timeout.toMillis()) { + @Override + public void run() { + if (!future.isDone()) { + scheduleInternalOperation( + "LogAppendEvent(name=" + name + ", tp=" + tp + ")", + tp, + () -> complete(new TimeoutException("Log append event " + name + "timed out for TopicPartition " + tp)) + ); + } + } + }); // Add the response to the deferred queue. if (!future.isDone()) { context.deferredEventQueue.add(offset, this); + context.coordinator.updateLastWrittenOffset(offset); } else { complete(null); + Review Comment: nit: We could remove this empty line. -- 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