apoorvmittal10 commented on code in PR #19581: URL: https://github.com/apache/kafka/pull/19581#discussion_r2075597778
########## clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsTest.java: ########## @@ -1068,6 +1072,149 @@ public void testUnsupportedCompress() { }); } + @ParameterizedTest + @ArgumentsSource(MemoryRecordsArgumentsProvider.class) + public void testSlice(Args args) { + // Create a MemoryRecords instance with multiple batches. Prior RecordBatch.MAGIC_VALUE_V2, + // every append in a batch is a new batch. After RecordBatch.MAGIC_VALUE_V2, we can have multiple Review Comment: So what I mean is that each `builder.append` in same `MemoryRecordsBuilder` creates new batch when magic is less than v2 and compression type is none. This can be seen in test case: https://github.com/apache/kafka/blob/7d027a4d83af15428d4aa9bdb2144adcad73408c/clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsTest.java#L1006. Do you think I need to add that when `compression type is none` in method comments for better clarity or I am missing something else? -- 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