gyang94 commented on code in PR #3623:
URL: https://github.com/apache/fluss/pull/3623#discussion_r3576878031


##########
fluss-server/src/main/java/org/apache/fluss/server/log/LogTablet.java:
##########
@@ -556,10 +594,12 @@ public void updateRemoteLogSize(long remoteLogSize) {
     public void updateRemoteLogEndOffset(long remoteLogEndOffset) {
         if (remoteLogEndOffset > this.remoteLogEndOffset) {
             this.remoteLogEndOffset = remoteLogEndOffset;
-
-            // try to delete these segments already exist in remote storage.
-            deleteSegmentsAlreadyExistsInRemote();
         }
+
+        // Try to delete segments that have already existed in remote storage 
on every retention
+        // pass. A remote TTL cleanup may leave the manifest end offset 
unchanged or decrease it,
+        // but locally retained inactive segments may have expired in the 
meantime.
+        deleteSegmentsAlreadyExistsInRemote();
     }

Review Comment:
   It is an existing edge case which may not trigger 
`deleteSegmentsAlreadyExistsInRemote` (no matter newly added TTL or existing 
local-segment file counts). 
   I'd suggest to handle this in another issue.



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