joeCarf commented on code in PR #7346:
URL: https://github.com/apache/rocketmq/pull/7346#discussion_r1322897718


##########
tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/TieredFlatFile.java:
##########
@@ -365,7 +365,10 @@ protected TieredFileSegment getFileByTime(long timestamp, 
BoundaryType boundaryT
             if (!segmentList.isEmpty()) {
                 return boundaryType == BoundaryType.UPPER ? segmentList.get(0) 
: segmentList.get(segmentList.size() - 1);
             }
-            return fileSegmentList.isEmpty() ? null : 
fileSegmentList.get(fileSegmentList.size() - 1);
+            if (fileSegmentList.isEmpty()) {
+                return null;
+            }

Review Comment:
   在这个上下文中我没有看到`fileSegmentList`排序的依据,辛苦贴一下相关代码位置



##########
tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/TieredFlatFile.java:
##########
@@ -365,7 +365,10 @@ protected TieredFileSegment getFileByTime(long timestamp, 
BoundaryType boundaryT
             if (!segmentList.isEmpty()) {
                 return boundaryType == BoundaryType.UPPER ? segmentList.get(0) 
: segmentList.get(segmentList.size() - 1);
             }
-            return fileSegmentList.isEmpty() ? null : 
fileSegmentList.get(fileSegmentList.size() - 1);
+            if (fileSegmentList.isEmpty()) {
+                return null;
+            }

Review Comment:
   在这个上下文中我没有看到`fileSegmentList`排序的依据,辛苦贴一下相关代码位置



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