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


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/Cleaner.java:
##########
@@ -401,6 +460,19 @@ public boolean shouldRetainRecord(RecordBatch batch, 
Record record) {
             if (outputBuffer.position() > 0) {
                 outputBuffer.flip();
                 MemoryRecords retained = 
MemoryRecords.readableRecords(outputBuffer);
+
+                // While groupSegmentsBySize() ensures source segments don't 
exceed Integer.MAX_VALUE,

Review Comment:
   Nice find. This approach does corrupt the txn index ... I think we could 
revert it from 4.4 first, and then we could discuss the better approach for 
trunk.



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