PragmaTwice commented on code in PR #3170: URL: https://github.com/apache/kvrocks/pull/3170#discussion_r2349294737
########## 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 + +# Schedule RocksDB periodic compactions during daily off-peak windows to reduce operational impact. +# +# Requirements: +# - Periodic compaction must be enabled (`periodic-compaction-seconds > 0`) +# - Time format: "HH:MM-HH:MM" in UTC (e.g., "02:00-04:30" for a 2.5-hour window) +# - Empty string disables off-peak scheduling +# +# Behavior: +# - RocksDB proactively triggers periodic compactions during the specified off-peak window +# - Compactions are optimized to complete before the next peak period begins +# +# Default: "" (disabled) +# +# Typical use cases: +# - Minimize compaction I/O during business hours for latency-sensitive workloads +# - Align resource-heavy operations with maintenance windows +# +# Reference: https://github.com/facebook/rocksdb/wiki/Daily-Off%E2%80%90peak-Time-Option +rocksdb.daily_offpeak_time_utc Review Comment: ```suggestion rocksdb.daily_offpeak_time_utc "" ``` -- 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]
