Commit Graph

66 Commits

Author SHA1 Message Date
Raúl Marín
1a615586d7
Merge branch 'master' into async_to_query_log 2023-06-27 13:12:13 +02:00
Vitaly Baranov
fad07bf4b8 Fix using locks in ProcessList. 2023-06-23 23:49:51 +02:00
Raúl Marín
b1cedf0e42 Simplify handling of AsyncInsertFlush 2023-06-20 11:38:19 +02:00
Raúl Marín
cf74aee6c9 Log async query flushes to query_log 2023-06-20 11:38:19 +02:00
Azat Khuzhin
5b2b20a0b0 Rename ThreadGroupStatus to ThreadGroup
There are methods like getThreadGroup() and ThreadGroupSwitcher class,
so seems that this is logical.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-07 15:31:48 +02:00
avogar
64db4c478b Use one map 2023-03-27 13:19:45 +00:00
avogar
d00587202d Make better 2023-03-24 19:25:07 +00:00
avogar
ee0fd39f2a Fix data-race 2023-03-24 15:20:19 +00:00
avogar
14351922e3 Fix possible deadlock in QueryStatus 2023-03-02 17:20:29 +00:00
Alexey Milovidov
ebbc22bcf1 Fix error 2023-02-03 02:16:30 +01:00
Alexey Milovidov
9b908a0be0 Fix trash around query kind, part 2 2023-02-01 03:31:31 +01:00
Alexey Milovidov
5c4db119fa Fix trash around query kind, part 1 2023-02-01 03:11:54 +01:00
serxa
693489a8ad review fixes 2023-01-12 15:51:04 +00:00
serxa
15bb127b01 replace every std::shared_mutex with DB::FastSharedMutex 2023-01-06 23:35:38 +00:00
Raúl Marín
5de11979ce
Unify query elapsed time measurements (#43455)
* Unify query elapsed time reporting

* add-test: Make shell tests executable

* Add some tests around query elapsed time

* Style and ubsan
2022-12-28 21:01:41 +01:00
Nikolai Kochetov
80867cb1fe Add more trash. 2022-10-21 22:19:06 +00:00
Alexey Milovidov
f88ed8195b Fix trash 2022-10-17 04:21:08 +02:00
vdimir
0f1a7c252d
better TemporaryDataOnDisk 2022-09-29 09:51:46 +00:00
vdimir
9f3f34548c
Allow to create temporaty streams on leaf TemporaryDataOnDisk 2022-09-29 09:51:45 +00:00
vdimir
15c7a3be34
Temp data on disk: build 2022-09-29 09:51:41 +00:00
vdimir
c0898ce289
Use abstraction for temporary data on disk in Sort and Aggregation 2022-09-29 09:51:41 +00:00
Azat Khuzhin
f76f14a99c Fix possible hung/deadlock on query cancellation
Right due to graceful cancellation of the query, it is possible to hung
accepting new queries or even have a deadlock, this is because
cancellation is done while acquiring ProcessListBase::mutex.

So this patch makes query cancellation lock-free, and now the lock will
be acquired only for preparing the query and after cancel is done.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-19 17:31:21 +02:00
Dmitry Novik
e25ed9547e
Update src/Interpreters/ProcessList.h 2022-08-29 20:26:37 +02:00
Dmitry Novik
865ee5d0d6 Refactor code 2022-08-29 20:24:35 +02:00
Dmitry Novik
1169315580 Add OvercommitTracker blocking 2022-08-29 19:44:05 +02:00
Azat Khuzhin
d82f2ff162 Set is_all_data_sent on exceptions too
This will avoid clickhouse-test complains about left queries after the
test, like in [1].

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/36258/9646487c093a75dc31e3e818417cfad83580b40f/stateful_tests__memory__actions_.html

Follow-up for: #36649
2022-04-30 13:00:44 +03:00
Azat Khuzhin
6339a48923 Add is_all_data_sent into system.processes
v2: fix SHOW PROCESSLIST (does not have process list entry)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-26 12:15:00 +03:00
Nikita Mikhaylov
224f4dc620
Made parallel_reading_from_replicas work with localhost replica (#36281) 2022-04-22 15:52:38 +02:00
alesapin
14e84ff6ef
Merge pull request #34802 from ClickHouse/overcommit-doc
Add documentation for memory overcommit
2022-03-25 20:50:44 +01:00
Maksim Kita
e30117a3d6 Fix clang-tidy warnings in Interpreters, IO folders 2022-03-14 18:17:35 +00:00
Dmitry Novik
be9082f1c4 Update comments for OvercommitTracker 2022-02-21 15:45:17 +00:00
Dmitry Novik
44d5ddc939 Fix deadlock in OvercommitTracker 2022-02-16 20:02:14 +00:00
Dmitry Novik
bb6dad7d0e Fix lock order 2022-02-15 15:04:13 +00:00
mergify[bot]
cb3e5f8538
Merge branch 'master' into memory-overcommit 2022-02-10 11:01:43 +00:00
Anton Popov
c28255850a fix metric Query 2022-02-01 15:06:49 +03:00
Dmitry Novik
c0970b75ee
Merge branch 'master' into memory-overcommit 2022-01-18 15:30:24 +03:00
Mikhail f. Shiryaev
d35ad19135
Fix review points 2022-01-10 18:23:17 +01:00
Mikhail f. Shiryaev
a8c83dce14
Use map for QueryKindAmounts 2022-01-10 13:49:53 +01:00
Mikhail f. Shiryaev
a882e64644
Use IAST::QueryKind instead of strings in QueryKindAmount 2021-12-29 17:32:59 +01:00
Mikhail f. Shiryaev
272ea7fc5b
Merge pull request #32609 from cmsxbc/query-kind-concurent_restriction
add settings: max_concurrent_select_queries and max_concurrent_insert_queries
2021-12-29 15:23:45 +01:00
Dmitry Novik
dce9390ece Init thread_group before QueryStatus creation 2021-12-16 16:46:15 +03:00
Dmitry Novik
de432f9270 Fix possible NPE when thread_group is not set 2021-12-14 16:39:53 +03:00
cmsxbc
b30e250eed add max_concurrent_select_queries and max_concurrent_insert_queries 2021-12-14 07:37:38 +00:00
Raúl Marín
0158133b62 SourceWithProgress: Don't use process_list_elem without checking it 2021-12-09 10:02:32 +01:00
mergify[bot]
600dcb749a
Merge branch 'master' into memory-overcommit 2021-12-07 00:40:20 +00:00
Raúl Marín
755ba5dc09 Don't forget to check the output of checkTimeLimitSoft 2021-12-02 15:09:53 +01:00
Raúl Marín
5662d0aa59 Use softer checks 2021-12-02 14:53:55 +01:00
Raúl Marín
c498b7ba59 Move limits check to ProcessList 2021-11-26 12:44:39 +01:00
Raúl Marín
f39648dafb Style 2021-11-23 09:23:22 +01:00
Raúl Marín
c6d3065885 Check max_execution_time in the pipeline and pulling executors 2021-11-23 09:23:22 +01:00