chia7712 commented on code in PR #23477:
URL: https://github.com/apache/kafka/pull/23477#discussion_r4030701626


##########
clients/src/main/java/org/apache/kafka/common/record/internal/AbstractLegacyRecordBatch.java:
##########
@@ -278,6 +278,17 @@ public CloseableIterator<Record> 
streamingIterator(BufferSupplier bufferSupplier
         return iterator(bufferSupplier, maxRecordBodySize);
     }
 
+    // the older message format versions cannot cheaply skip the record body, 
so both variants fully decode it
+    @Override
+    public CloseableIterator<Record> skipKeyValueIterator(BufferSupplier 
bufferSupplier) {
+        return iterator(bufferSupplier);
+    }
+
+    @Override
+    public CloseableIterator<Record> skipKeyValueIterator(BufferSupplier 
bufferSupplier, int maxRecordBodySize) {
+        return iterator(bufferSupplier, maxRecordBodySize);

Review Comment:
   It would be great if the legacy record could implement a partial read, so we 
could get rid of maxRecordBodySize entirely.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to