You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "wuchong (via GitHub)" <gi...@apache.org> on 2026/08/13 06:57:40 UTC

Re: [PR] [server] Support independent local log TTL [fluss]

wuchong commented on code in PR #3778:
URL: https://github.com/apache/fluss/pull/3778#discussion_r3772293615


##########
fluss-client/src/test/java/org/apache/fluss/client/admin/FlussAdminITCase.java:
##########
@@ -928,6 +951,24 @@ void testCreateTableWithInvalidProperty() {
                         "Currently, Primary Key Table supports ARROW or COMPACTED log format when kv format is COMPACTED.");
     }
 
+    @Test
+    void testCreateTableWithLocalTtlAndInfiniteRemoteTtl() throws Exception {
+        TablePath tablePath =
+                TablePath.of(
+                        DEFAULT_TABLE_PATH.getDatabaseName(),
+                        "test_local_ttl_with_infinite_remote_ttl");
+        TableDescriptor tableDescriptor =
+                TableDescriptor.builder()
+                        .schema(DEFAULT_SCHEMA)
+                        .property(ConfigOptions.TABLE_LOG_TTL.key(), "0ms")

Review Comment:
   If `0ms` is not allowed for `TABLE_LOG_LOCaAL_TTL`, why is it permitted for `TABLE_LOG_TTL`?  I think we should allow `0` to disable TTL, just like `table.log.ttl` and align with `table.log.ttl`. 



##########
website/docs/maintenance/tiered-storage/remote-storage.md:
##########
@@ -35,7 +35,10 @@ Below is the list for all configurations to control the log segments tiered beha
 
 When local log segments are copied to remote storage, the local log segments will be deleted to reduce local disk cost.
 But sometimes, we want to keep the several latest log segments retain in local, although they have been coped to remote storage for better read performance.
-You can control how many log segments to retain in local by setting the configuration `table.log.tiered.local-segments`(default is 2) per table.
+You can control local retention per table with `table.log.tiered.local-segments` (default is 2)
+and `table.log.local-ttl` (default is 1 day). A configured local TTL must be greater than zero
+and, when `table.log.ttl` is positive, less than or equal to `table.log.ttl`. A local segment is
+deleted only after it has been copied to remote storage.

Review Comment:
   "A local segment" --> "An expired local segment"



##########
fluss-server/src/test/java/org/apache/fluss/server/log/remote/TieredLocalSegmentTTLTest.java:
##########
@@ -94,34 +100,24 @@ void testInactiveTieredLocalSegmentRemovedAfterTtl(boolean partitionTable) throw
 
     @ParameterizedTest
     @ValueSource(booleans = {true, false})
-    void testExpiredActiveSegmentWaitsForHighWatermarkWithoutRemoteLogEndOffset(

Review Comment:
   Why this test is removed? I think this is meaningful to test expire active segments. 



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