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


##########
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 (0xFFFFFFFFFFFFFFFE, 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/Leveled-Compaction#periodic-compaction
+rocksdb.periodic_compaction_seconds
+
+# 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

Review Comment:
   instead we can just make it a comment.
   
   ```suggestion
   # rocksdb.ttl <some example value>
   ```



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