jsancio commented on code in PR #15912: URL: https://github.com/apache/kafka/pull/15912#discussion_r1596923121
########## raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java: ########## @@ -284,6 +284,8 @@ private int validateMemoryRecordAndReturnCount(MemoryRecords memoryRecord) { ); } else if (numberOfRecords == null) { throw new IllegalArgumentException("valueCreator didn't create a batch with the count"); + } else if (numberOfRecords < 1) { Review Comment: Added the test. -- 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