PragmaTwice commented on code in PR #3170:
URL: https://github.com/apache/kvrocks/pull/3170#discussion_r2339841818


##########
kvrocks.conf:
##########
@@ -1124,5 +1124,54 @@ rocksdb.max_compaction_bytes 0
 # Default: 0
 rocksdb.sst_file_delete_rate_bytes_per_sec 0
 
+# Enable RocksDB periodic compaction to force full compaction of SST files 
older than the specified time (in seconds).
+# If a compaction filter is registered, it will be applied during these 
compactions. 
+# Set to 0 to disable this feature.
+#
+# Default: 18446744073709551614 (UINT64_MAX - 1), a special value indicating 
RocksDB-controlled behavior.
+# Currently, RocksDB interprets this default as 30 days (2592000 seconds).
+#
+# Typical use cases:
+# - Enforcing data cleanup via compaction filters (e.g., TTL expiration)
+# - Automatically refreshing data encoding/compression formats without manual 
intervention
+#
+# Reference: https://github.com/facebook/rocksdb/wiki/Periodic-Compaction
+rocksdb.periodic_compaction_seconds 18446744073709551614
+
+# Enable RocksDB Time-to-Live (TTL) to automatically schedule compaction for 
SST files containing expired data.
+# - Files containing data older than the TTL (in seconds) will be prioritized 
for background compaction.
+# - Requires a registered compaction filter (e.g., TTL filter) to identify and 
remove expired entries.
+# - Set to 0 to disable TTL-based compaction.
+#
+# Default: 18446744073709551614 (0xFFFFFFFFFFFFFFFE, UINT64_MAX - 1), 
delegating control to RocksDB.
+# Current RocksDB behavior interprets this default as 30 days (2592000 
seconds).
+#
+# Use cases:
+# - Automatic expiration of ephemeral data (e.g., session tokens, temporary 
logs)
+# - Lifecycle management for time-series datasets
+#
+# Reference: https://github.com/facebook/rocksdb/wiki/Leveled-Compaction#ttl
+rocksdb.ttl 18446744073709551614

Review Comment:
   is `ttl` required by `periodic_compaction_seconds`? any dependency here? it 
seems that we didn't use this feature yet in kvrocks.
   
   also it is enabled by default here which may cause issues?



-- 
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-unsubscr...@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to