Allow to load marks in threadpool in advance#40821
Allow to load marks in threadpool in advance#40821kssenii merged 15 commits intoClickHouse:masterfrom
Conversation
|
Btw, we have a bug in marks loading: #40399 |
25a06cd to
8ba9d88
Compare
dc63bfd to
48dc32f
Compare
|
|
||
| MergeTreeMarksLoader::~MergeTreeMarksLoader() | ||
| { | ||
| if (future.valid()) |
There was a problem hiding this comment.
Interesting to check, at what moment in time, the future becomes invalid. Looks like some race condition is still possible.
This reverts commit ec55c90.
00cb4a8 to
9abb137
Compare
9abb137 to
487bc0f
Compare
programs/local/LocalServer.cpp
Outdated
| /// thread status should be destructed before shared context because it relies on process list. | ||
| thread_status.reset(); | ||
| shared_context.reset(); |
There was a problem hiding this comment.
Consider just placing thread_status and shared_context fields in ClientBase in reverse order
There was a problem hiding this comment.
I assume they are already in the right order: shared_context in order of destruction goes after thread_status in ClientBase. Am I wrong?
There was a problem hiding this comment.
Hm, yes, so they will be destructed in the right order without this change (but the comment is still useful, we can move it to ClientBase.h)
c851389 to
487bc0f
Compare
1a2bebb to
b7d751b
Compare
|
Results look good for s3 and not good for local disk :/
ip-172-31-4-213.eu-west-1.compute.internal :) select event, value / 1000 / 1000 from system.events where event = 'WaitMarksLoadMicroseconds'
SELECT
event,
(value / 1000) / 1000
FROM system.events
WHERE event = 'WaitMarksLoadMicroseconds'
Query id: dae62540-d6e0-48c0-b305-afb68489583b
┌─event─────────────────────┬─divide(divide(value, 1000), 1000)─┐
│ WaitMarksLoadMicroseconds │ 92.359618 │
└───────────────────────────┴───────────────────────────────────┘
1 row in set. Elapsed: 0.005 sec.
ip-172-31-4-213.eu-west-1.compute.internal :) select event, value / 1000 / 1000 from system.events where event = 'WaitMarksLoadMicroseconds'
SELECT
event,
(value / 1000) / 1000
FROM system.events
WHERE event = 'WaitMarksLoadMicroseconds'
Query id: 1027f644-5563-4d6f-9ffb-f8dba17f08b9
┌─event─────────────────────┬─divide(divide(value, 1000), 1000)─┐
│ WaitMarksLoadMicroseconds │ 17.028783 │
└───────────────────────────┴───────────────────────────────────┘
1 row in set. Elapsed: 0.004 sec.
ip-172-31-4-213.eu-west-1.compute.internal :) select event, value / 1000 / 1000 from system.events where event = 'WaitMarksLoadMicroseconds'
SELECT
event,
(value / 1000) / 1000
FROM system.events
WHERE event = 'WaitMarksLoadMicroseconds'
Query id: 4146b46b-00bf-4728-9a91-8ed01b23be9d
┌─event─────────────────────┬─divide(divide(value, 1000), 1000)─┐
│ WaitMarksLoadMicroseconds │ 1.628356 │
└───────────────────────────┴───────────────────────────────────┘
1 row in set. Elapsed: 0.004 sec.
ip-172-31-4-213.eu-west-1.compute.internal :) select event, value / 1000 / 1000 from system.events where event = 'WaitMarksLoadMicroseconds'
SELECT
event,
(value / 1000) / 1000
FROM system.events
WHERE event = 'WaitMarksLoadMicroseconds'
Query id: e59ebb10-f003-4c99-ac3d-3483340b03a7
┌─event─────────────────────┬─divide(divide(value, 1000), 1000)─┐
│ WaitMarksLoadMicroseconds │ 4.8989080000000005 │
└───────────────────────────┴───────────────────────────────────┘
1 row in set. Elapsed: 0.130 sec. |
test_dns_cache/test.py::test_host_is_drop_from_cache_after_consecutive_failures - flaky in master.
00632_get_sample_block_cache - flaky in master
01825_type_json_ghdata_insert_select - DB::Exception: Message: The specified key does not exist. - flaky in master. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Allow to load marks with threadpool in advance. Regulated by setting
load_marks_asynchronously(default: 0).