zuston commented on code in PR #3222:
URL: https://github.com/apache/fluss/pull/3222#discussion_r3529447378


##########
fluss-server/src/main/java/org/apache/fluss/server/log/LogTablet.java:
##########
@@ -1196,17 +1259,27 @@ private List<LogSegment> deletableSegments(long 
endOffset) {
         // readers is in progress.
         List<LogSegment> deletableSegments = new ArrayList<>();
         List<LogSegment> logSegments = localLog.getSegments().values();
-        // ignore the segments configured to be retained
-        for (int i = 0; i < logSegments.size() - tieredLogLocalSegments; i++) {
-            if (logSegments.get(i + 1).getBaseOffset() <= endOffset) {
-                deletableSegments.add(logSegments.get(i));
-            } else {
+        int tierProtectedStartIndex = logSegments.size() - 
tieredLogLocalSegments;
+        long now = clock.milliseconds();

Review Comment:
   sounds good. let me take a look tomorrow. 



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