Kseniia Sumarokova
7cbf77a178
Update LRUFileCachePriority.cpp
2023-03-09 19:55:58 +01:00
Mike Kot
9920a52c51
use std::lerp, constexpr hex.h
2023-03-07 22:50:17 +00:00
Robert Schulze
f72286c8f3
Merge branch 'master' into qc-max_cache_size
2023-02-03 10:54:35 +01:00
Robert Schulze
216636f984
Make query cache global settings re-configurable
2023-02-01 10:35:19 +00:00
Robert Schulze
8a9493aeb9
Update QueryCache.cpp
2023-02-01 11:28:00 +01:00
Robert Schulze
f6259fbd65
Query cache: Improve logging
2023-02-01 10:24:17 +00:00
Robert Schulze
325c6bdf3d
Renaming: "Query Result Cache" --> "Query Cache"
...
Reasons:
- The cache will at some point store intermediate results as opposed to
only query results. We should change the terminology now without
having to worry about backward compat.
- Equivalent caches in MySQL (1) and Starrocks (2) are called "query
cache".
- The new name is ca. 13.8% more catchy.
(1) https://dev.mysql.com/doc/refman/5.6/en/query-cache.html
(2) https://docs.starrocks.io/en-us/2.5/using_starrocks/query_cache
2023-01-31 09:54:34 +00:00
Robert Schulze
27b978381b
Use more speaking setting names
2023-01-30 14:20:43 +00:00
Robert Schulze
e30c38cab3
Fix up some leftovers
2023-01-27 10:43:43 +00:00
Robert Schulze
7d97fab2dc
Untangle query result cache settings
...
This PR modularizes the configuration options of the query result cache
(QRC).
1. Add a feature toggle "allow_experimental_query_result_cache = false"
which controls whether the experimental QRC can be used at all. This
configuration option will be removed once the QRC becomes
non-experimental.
2. Modularize the existing two configuration settings
"enable_experimental_query_result_cache" and
"enable_experimental_query_result_cache_passive_usage" into three
orthogonal settings:
- "use_query_result_cache = false" controls whether a query (or all
queries of the session) utilize the query result cache
- settings "use_query_result_cache_passive_usage = true" and
"use_query_result_cache_active_usage = true" control the way a
query (or all queries of the session) utilize the query result
cache: "passive" use is reading, "active" use is writing.
2023-01-26 21:17:48 +00:00
Kseniia Sumarokova
297516a084
Merge pull request #45614 from kssenii/rename-some-setting
...
Rename setting `max_query_cache_size`
2023-01-26 10:46:03 +01:00
kssenii
29de87e145
Rename setting
2023-01-25 16:36:36 +01:00
Robert Schulze
0ab7ae6c17
Merge pull request #43797 from ClickHouse/query-result-cache
...
Query result cache [experimental]
2023-01-23 19:54:35 +01:00
kssenii
f56f515392
Fix
2023-01-19 18:45:06 +01:00
Robert Schulze
27fe7ebd93
Cosmetics
2023-01-15 16:12:48 +00:00
Robert Schulze
88df1df3e6
Fix Darwin build
2023-01-13 10:26:49 +00:00
Robert Schulze
15e11741cb
Cosmetics
2023-01-13 00:00:23 +00:00
Robert Schulze
1b53307375
Refcount cache entries to improve lookup performance
2023-01-12 23:38:39 +00:00
Robert Schulze
0c528fca29
Introduce SourceFromChunks to avoid unnecessary partial result chunk concatenation
2023-01-12 23:01:00 +00:00
Robert Schulze
12a29fec35
Hide secrets from system.query_result_cache
2023-01-11 12:50:45 +00:00
Robert Schulze
923fa2c15a
Fix review comments, pt. II
2023-01-10 10:21:08 +00:00
Robert Schulze
ad4884b394
Fix review comments, pt. I
2023-01-09 21:42:51 +00:00
Robert Schulze
4fcead15c3
Fix handling of exceptions during query runtime
2023-01-04 22:33:04 +00:00
Robert Schulze
4e00a8721a
Add comment
2023-01-04 14:07:21 +00:00
Robert Schulze
25919ce1f8
Fix style
2023-01-03 22:02:57 +00:00
Robert Schulze
4bdab0d5e8
Fix NASTY C++ PITFALL: Function try blocks implicitly rethrow the exception
...
https://stackoverflow.com/a/5612508
Function try blocks silently rethrow the exception in ctors/dtors, even
with "catch(...){}". Changed to standard try/catch.
Now also logging exceptions.
2023-01-03 20:39:08 +00:00
Robert Schulze
0dda4921ba
Cosmetics
2023-01-03 20:17:24 +00:00
Robert Schulze
e4b2ed6d6f
Fix style
2023-01-03 20:01:58 +00:00
Robert Schulze
210af0d119
Use AST visitor instead of rolling custom logic
2023-01-03 19:58:09 +00:00
Robert Schulze
6215410ea4
Cosmetics
2023-01-02 20:47:05 +00:00
Robert Schulze
814c6a899d
Simplify the code a bit
2023-01-02 11:08:49 +00:00
Robert Schulze
4cb7ac57e4
Small renaming for more clarity
2023-01-02 11:02:27 +00:00
Robert Schulze
8381d8b467
query_result_cache_keep_seconds_alive --> query_result_cache_ttl
2023-01-02 09:38:40 +00:00
Robert Schulze
8199fce52e
Add note about optimizations
2023-01-02 09:30:44 +00:00
Robert Schulze
63375b2d42
Make skip_insert atomic
2023-01-02 09:30:44 +00:00
Robert Schulze
37ad911114
Remove stale entries in Reader
2023-01-02 09:30:44 +00:00
Robert Schulze
3c58874d77
In-class initialization of some member variables
2023-01-02 09:30:44 +00:00
Robert Schulze
ba55fd3ad2
Cosmetics
2023-01-02 09:30:44 +00:00
Robert Schulze
e9e04166d9
Merge remote-tracking branch 'origin/master' into query-result-cache
2023-01-02 08:20:27 +00:00
vdimir
921ac8f9fb
Fix build and unit test
2022-12-22 13:08:54 +00:00
vdimir
88008726d8
Merge branch 'master' into vdimir/tmp-data-in-fs-cache-2
2022-12-22 10:58:39 +00:00
vdimir
ac3fd1e73d
Resolve code review comments
2022-12-22 10:22:58 +00:00
vdimir
d46c4c1a36
fix FileCache::loadCacheInfoIntoMemory with temporary
2022-12-22 10:22:57 +00:00
vdimir
182b34c11e
Fixes
2022-12-22 10:22:57 +00:00
vdimir
8fe6245835
FileSegmentKind toString uses magic_enum
2022-12-22 10:22:57 +00:00
vdimir
69731351e2
Undo check deletion in FileCache::createFileSegmentForDownload
2022-12-22 10:22:56 +00:00
vdimir
26716121f4
Make 'reserve' and 'write' in FileSegmentRangeWriter independent
2022-12-22 10:22:55 +00:00
Vladimir C
f2eaf0158e
Apply suggestions from code review
...
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
2022-12-22 10:22:55 +00:00
vdimir
d30d25dbbe
Temporary files evict fs cache
2022-12-22 10:22:49 +00:00
Kseniia Sumarokova
b8bf28eee0
Merge branch 'master' into write-throw-cache-fix-writing
2022-12-20 11:40:49 +01:00