iit2009060 commented on code in PR #15060:
URL: https://github.com/apache/kafka/pull/15060#discussion_r1435854787
##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -1289,15 +1289,21 @@ public FetchDataInfo read(RemoteStorageFetchInfo
remoteStorageFetchInfo) throws
}
RemoteLogSegmentMetadata remoteLogSegmentMetadata =
rlsMetadataOptional.get();
- int startPos = lookupPositionForOffset(remoteLogSegmentMetadata,
offset);
InputStream remoteSegInputStream = null;
try {
- // Search forward for the position of the last offset that is
greater than or equal to the target offset
- remoteSegInputStream =
remoteLogStorageManager.fetchLogSegment(remoteLogSegmentMetadata, startPos);
- RemoteLogInputStream remoteLogInputStream = new
RemoteLogInputStream(remoteSegInputStream);
-
- RecordBatch firstBatch = findFirstBatch(remoteLogInputStream,
offset);
-
+ int startPos = 0;
+ RecordBatch firstBatch = null;
+ while (firstBatch == null && rlsMetadataOptional.isPresent()) {
Review Comment:
@clolov I believe this merging of segments happens in the background , but
before the merging start we disable the compaction on the topic to make it
ready for tiered storage because of which merging of segments never happens.
--
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]