From 27fe7ebd935f8795eac019166c4d01682db6a322 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sun, 15 Jan 2023 15:39:38 +0000 Subject: [PATCH] Cosmetics --- docs/en/operations/query-result-cache.md | 10 +++++++--- src/Interpreters/Cache/QueryResultCache.h | 2 +- src/Processors/Sources/SourceFromChunks.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/en/operations/query-result-cache.md b/docs/en/operations/query-result-cache.md index 9258b70d349..7f19cd9f434 100644 --- a/docs/en/operations/query-result-cache.md +++ b/docs/en/operations/query-result-cache.md @@ -7,9 +7,8 @@ title: "Query Result Cache [experimental]" # Query Result Cache [experimental] -The (experimental) query result cache allows to compute SELECT queries just once and to serve further executions of the same query -immediately from the cache. Depending on the type of the queries, this can dramatically reduce latency and resource consumption of the -ClickHouse server. +The query result cache allows to compute SELECT queries just once and to serve further executions of the same query immediately from the +cache. Depending on the type of the queries, this can dramatically reduce latency and resource consumption of the ClickHouse server. ## Background, Design and Limitations @@ -31,6 +30,11 @@ Transactionally inconsistent caching is traditionally provided by client tools o the same caching logic and configuration is often duplicated. With ClickHouse's query result cache, the caching logic moves to the server side. This reduces maintenance effort and avoids redundancy. +:::warning +This is an experimental feature that should not be used in production. There are known cases (e.g. in distributed query processing) where +wrong results are cached/stored. +::: + ## Usage Examples and Configuration Settings The query/user/profile-level parameter [enable_experimental_query_result_cache](settings/settings.md#enable-experimental-query-result-cache) diff --git a/src/Interpreters/Cache/QueryResultCache.h b/src/Interpreters/Cache/QueryResultCache.h index 880b40c35a4..65cab854a45 100644 --- a/src/Interpreters/Cache/QueryResultCache.h +++ b/src/Interpreters/Cache/QueryResultCache.h @@ -120,7 +120,7 @@ public: friend class QueryResultCache; /// for createWriter() }; - /// Looks up a result chunk for a key in the cache and (if found) constructs a pipe with the chunk as source. + /// Looks up a query result for a key in the cache and (if found) constructs a pipe with the query result chunks as source. class Reader { public: diff --git a/src/Processors/Sources/SourceFromChunks.h b/src/Processors/Sources/SourceFromChunks.h index ba552b60bb5..d41999208a0 100644 --- a/src/Processors/Sources/SourceFromChunks.h +++ b/src/Processors/Sources/SourceFromChunks.h @@ -19,7 +19,7 @@ protected: Chunk generate() override; private: - SourceFromChunks(Block header, std::shared_ptr chunks_, bool move_from_chunks); + SourceFromChunks(Block header, std::shared_ptr chunks_, bool move_from_chunks_); const std::shared_ptr chunks; Chunks::iterator it;