v.20.4New Feature
ClickHouse Adds Timeout Control for Dictionary Sources
Now ClickHouse controls timeouts of dictionary sources on its side. Two new settings added to cache dictionary configuration:strict_max_lifetime_seconds, which ismax_lifetimeby default, andquery_wait_timeout_milliseconds, which is one minute by default. The first settings is also useful withallow_read_expired_keyssettings (to forbid reading very expired keys). #10337 (Nikita Mikhaylov)
Why it matters
This feature addresses the need for better control over dictionary cache validity and query waiting behavior by enforcing stricter lifetime limits and limiting how long queries can wait for dictionary updates, thus preventing reading very expired keys and improving system stability.How to use it
To apply this feature, configure the dictionary cache with the new settings in the dictionary configuration file. Usestrict_max_lifetime_seconds to set the maximum allowed lifetime for dictionary data (defaulting to max_lifetime). Adjust query_wait_timeout_milliseconds to control how long queries wait for freshness (default is one minute). These settings complement the allow_read_expired_keys option to manage key expiration behavior.