rustyrazorblade commented on code in PR #4399:
URL: https://github.com/apache/cassandra/pull/4399#discussion_r2414974162
##########
conf/cassandra.yaml:
##########
@@ -617,6 +617,54 @@ counter_cache_save_period: 7200s
# Disabled by default, meaning all keys are going to be saved
# counter_cache_keys_to_save: 100
+# Dictionary compression settings for ZSTD dictionary-based compression
+# These settings control the automatic training and caching of compression
dictionaries
+# for tables that use ZSTD dictionary compression.
+
+# How often to refresh compression dictionaries across the cluster.
+# During refresh, nodes will check for newer dictionary versions and update
their caches.
+# Min unit: s
+compression_dictionary_refresh_interval: 3600s
+
+# Initial delay before starting the first dictionary refresh cycle after node
startup.
+# This prevents all nodes from refreshing simultaneously when the cluster
starts.
+# Min unit: s
+compression_dictionary_refresh_initial_delay: 10s
+
+# Maximum number of compression dictionaries to cache per table.
+# Each table using dictionary compression can have multiple dictionaries cached
+# (current version plus recently used versions for reading older SSTables).
+compression_dictionary_cache_size: 10
+
+# How long to keep compression dictionaries in the cache before they expire.
+# Expired dictionaries will be removed from memory but can be reloaded if
needed.
+# Min unit: s
+compression_dictionary_cache_expire: 3600s
Review Comment:
I think the eviction code is broken, see my full comment in JIRA. When
compacting a table that I left overnight (assuming the dictionary was evicted)
I get this:
```
WARN [CompactionExecutor:869] 2025-10-08T17:16:05,033
SSTableWriter.java:157 - Failed to open
/Users/jhaddad/dev/cassandra/bin/../data/data/chunk4_2/keyvalue-1b255f4def2540a600000000000000f6/pa-2-big
for writing
java.lang.IllegalStateException: Dictionary is being closed
at
org.apache.cassandra.io.compress.ZstdDictionaryCompressor.lambda$getOrCreate$1(ZstdDictionaryCompressor.java:100)
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]