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 is max_lifetime by default and query_wait_timeout_milliseconds, which is one minute by default. The first settings is also useful with allow_read_expired_keys settings (to forbid reading very expired keys). #10337 (Nikita Mikhaylov).
ClickHouse introduces new timeout controls for dictionary sources, adding two settings: strict_max_lifetime_seconds and query_wait_timeout_milliseconds.

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 with allow_read_expired_keys, ensuring data freshness and stability during queries.

How to use it

In the dictionary cache configuration, set the strict_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.