junrao commented on code in PR #17676:
URL: https://github.com/apache/kafka/pull/17676#discussion_r1828515179


##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -1704,7 +1704,7 @@ public FetchDataInfo read(RemoteStorageFetchInfo 
remoteStorageFetchInfo) throws
                     new LogOffsetMetadata(offset, 
remoteLogSegmentMetadata.startOffset(), startPos),
                     MemoryRecords.readableRecords(buffer));
             if (includeAbortedTxns) {
-                fetchDataInfo = 
addAbortedTransactions(firstBatch.baseOffset(), remoteLogSegmentMetadata, 
fetchDataInfo, logOptional.get());
+                fetchDataInfo = 
addAbortedTransactions(firstBatch.baseOffset(), remoteLogSegmentMetadata, 
fetchDataInfo, logOptional.get(), enrichedRecordBatch.getSkippedBytes());

Review Comment:
   Instead of passing in skippedBytes, could we just add it to startPos? Also, 
when creating FetchDataInfo, it's more accurate to use firstBatch.baseOffset 
instead of offset.



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