You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "gyang94 (via GitHub)" <gi...@apache.org> on 2026/07/06 12:59:48 UTC
Re: [PR] [server] Respect the option of `table.log.ttl` for local segments [fluss]
gyang94 commented on code in PR #3222:
URL: https://github.com/apache/fluss/pull/3222#discussion_r3529059811
##########
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:
We have three different time during `rolling active segment`, `delete local segments` and `delete remote segments`. Will it be better to froze a timestamp at the beginning of LogTieringTask.run() ?
Then we use the same timestamp value in each step of this LogTieringTask round.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org