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


##########
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:
   Got it. We can refactor the logic in the futrue, but would you mind adding 
comments?



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