mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
Add note + test about exception handling
This commit is contained in:
parent
8381d8b467
commit
9ab910102f
@ -59,6 +59,11 @@ The cache exists once per ClickHouse server process but cache results are by def
|
||||
|
||||
Query results are referenced in the cache by the [Abstract Syntax Tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of their query. This means that caching is agnostic to upper/lowercase, for example `SELECT 1` and `select 1` are treated as the same query.
|
||||
|
||||
:::warning
|
||||
As of now, the query result cache does not properly handle exceptions during query execution. It will write a partial (incorrect) entry of
|
||||
the result up to the point where the exception occurred instead of not writing a result into the cache.
|
||||
:::
|
||||
|
||||
### Further Configuration Options:
|
||||
|
||||
To configure the size of the query result cache, use setting [query_result_cache_size](server-configuration-parameters/settings.md#server_configuration_parameters_query-result-cache-size).
|
||||
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,9 @@
|
||||
-- Tags: no-parallel
|
||||
|
||||
SYSTEM DROP QUERY RESULT CACHE;
|
||||
|
||||
-- if an exception is thrown during query execution, no entry must be created in the query result cache (unfortunately that happens currently)
|
||||
SELECT throwIf(number = 10000, 'bla') from system.numbers SETTINGS enable_experimental_query_result_cache = true; -- { serverError 395 }
|
||||
SELECT COUNT(*) FROM system.queryresult_cache;
|
||||
|
||||
SYSTEM DROP QUERY RESULT CACHE;
|
Loading…
Reference in New Issue
Block a user