squah-confluent commented on code in PR #21577:
URL: https://github.com/apache/kafka/pull/21577#discussion_r2893091229


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/TransactionIndex.java:
##########
@@ -216,22 +219,19 @@ private FileChannel channelOrNull() {
     }
 
     private Iterable<AbortedTxnWithPosition> iterable() {
-        return iterable(() -> ByteBuffer.allocate(AbortedTxn.TOTAL_SIZE));
-    }
-
-    private Iterable<AbortedTxnWithPosition> iterable(Supplier<ByteBuffer> 
allocate) {
         FileChannel channel = channelOrNull();
         if (channel == null)
             return List.of();
 
+        ByteBuffer buffer = ByteBuffer.allocate(ABORTED_TXN_RECORD_SIZE);

Review Comment:
   Could you add a comment after the last field in `AbortedTxn.json`? It's 
harder to miss when adding new fields.



-- 
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