adixitconfluent commented on code in PR #20286: URL: https://github.com/apache/kafka/pull/20286#discussion_r2247059515
########## core/src/main/java/kafka/server/share/SharePartition.java: ########## @@ -1799,6 +1793,10 @@ private Optional<Throwable> acknowledgeBatchRecords( if (throwable.isPresent()) { return throwable; } + + if (inFlightBatch.batchHasOngoingStateTransition()) { + return Optional.of(new InvalidRecordStateException("The batch has on-going acknowledgement.")); Review Comment: I think it would be helpful to have a debug log like below here as well -- 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