v.20.3New Feature
ClickHouse Enhances Dictionary Source Timeout Controls with New Settings
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 allows ClickHouse to manage dictionary source timeouts internally, improving reliability and control over dictionary caching. It helps prevent reading excessively expired keys when used withallow_read_expired_keys, ensuring data freshness and stability during queries.How to use it
In the dictionary cache configuration, set thestrict_max_lifetime_seconds parameter to define the maximum allowed lifetime of dictionary entries (defaults to max_lifetime). Also, configure query_wait_timeout_milliseconds to specify how long a query should wait for fresh dictionary data (default is one minute). These settings can be adjusted according to your caching and freshness requirements.