Anton Popov
31e8b692f4
fix typo
2023-01-31 01:13:23 +00:00
Anton Popov
839cd614fb
fix memory leak in azure sdk
2023-01-31 01:01:10 +00:00
Nikolai Kochetov
aee7bb0d91
Merge pull request #42577 from ClickHouse/clean-thread-id
...
Clear thread::id when ThreadFromGlobalPool exits.
2022-10-24 12:03:28 +02:00
Nikolai Kochetov
06d46ca51b
Clear thread::id when ThreadFromGlobalPool exits.
2022-10-22 13:28:22 +00:00
Azat Khuzhin
4e76629aaf
Fixes for -Wshorten-64-to-32
...
- lots of static_cast
- add safe_cast
- types adjustments
- config
- IStorage::read/watch
- ...
- some TODO's (to convert types in future)
P.S. That was quite a journey...
v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Nikolai Kochetov
d09a5e8fd7
Revert "Attempt to fix abort from parallel parsing ( #42496 )"
...
This reverts commit 4d703b792c
.
2022-10-20 21:46:26 +02:00
Nikita Mikhaylov
4d703b792c
Attempt to fix abort from parallel parsing ( #42496 )
2022-10-20 17:13:18 +02:00
Frank Chen
20191932df
Fix style
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-13 00:41:05 +08:00
Frank Chen
7e1f2901da
Fix
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-13 00:06:17 +08:00
Frank Chen
ebaa24ecae
Fix flaky tests
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-12 22:15:30 +08:00
Frank Chen
d9a516288c
Resolve comments
2022-09-01 11:56:10 +08:00
Frank Chen
922a0dee74
Fix style
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-08-30 15:14:12 +08:00
Frank Chen
83cbdef3c6
Fix context re-initialization for ThreadPool
2022-08-30 12:26:23 +08:00
Frank Chen
cd19366b44
Move classes into DB::OpenTelemetry namespace
2022-08-24 16:41:40 +08:00
Frank Chen
57dde8c250
Clean up header inclusion
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-08-02 15:43:19 +08:00
Frank Chen
40c6e4c0d6
Merge remote-tracking branch 'origin/master' into tracing_context_propagation
2022-08-02 10:02:09 +08:00
Azat Khuzhin
68789895a4
ThreadPool: incapsulate Poco::Event and std: 🧵 :id into State struct
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-13 15:51:49 +03:00
Azat Khuzhin
7ffa15b94b
ThreadPool: fix thread_id assignment
...
As found by @KochetovNicolai before this patch, lambda in
ThreadFromGlobalPool() ctor assigns value only to a copy of the
thread_id value, and so check in joinable() had been working
incorrectly, fix this by changing the value not the shared_ptr itself.
Also it is not safe to assign thread_id w/o atomics, since this can be
racy, so wrap id with std::atomic<>
Fixes : #28431
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-13 15:42:46 +03:00
Azat Khuzhin
25eb82f120
ThreadPool: do not use joinable() internally
...
joinable() should be used only outside, since internally it is enough to
know `state` to know that something is wrong.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-13 15:42:46 +03:00
Azat Khuzhin
3473b80077
ThreadPool: add some clarification comments
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-13 15:42:46 +03:00
Frank Chen
32931857f0
Propagate tracing context across threads
2022-07-07 17:41:43 +08:00
Nikita Mikhaylov
36bdee0499
Deleted settings
2022-04-22 13:56:16 +00:00
Maksim Kita
e7772ed434
Fix clang-tidy warnings in Common folder
2022-03-14 18:17:35 +00:00
Tomáš Hromada
445b0ba7cc
Expose all GlobalThreadPool config params ( #31285 )
2021-11-12 16:24:47 +03:00
Alexey Milovidov
fe6b7c77c7
Rename "common" to "base"
2021-10-02 10:13:14 +03:00
alexey-milovidov
28911a959f
Merge pull request #28431 from azat/thread-pool-joinable
...
[RFC] Do not allow ThreadFromGlobalPool::join() from the spawned/occupated thread
2021-09-11 05:44:56 +03:00
Nikita Mikhaylov
ea0fbf81af
Renaming
2021-09-06 12:01:16 +00:00
Nikita Mikhaylov
0249015515
added priority queue
2021-09-06 11:37:51 +00:00
Azat Khuzhin
e7ed98fa58
Do not allow ThreadFromGlobalPool::join() from the spawned/occupated thread
...
v2: wrap with shared_ptr
https://clickhouse-test-reports.s3.yandex.net/28431/f7b3a3e952038923b1347b3d461061326d0ffc27/functional_stateless_tests_(address).html#fail1
2021-09-05 21:59:49 +03:00
Nikita Mikhaylov
cc7c221fad
Own PriorityQueue + prettifying the code
2021-09-02 21:31:32 +00:00
Nikita Mikhaylov
a6fe91ca47
get rid of half of allocations
2021-09-02 17:40:29 +00:00
Maksim Kita
67e9b85951
Merge ext into common
2021-06-16 23:28:41 +03:00
Azat Khuzhin
590a6b9855
Add ThreadPool::finished()
2021-04-28 22:33:29 +03:00
Nikita Mikhailov
2f04cb5ebe
abort() instead of std::terminate() + cleanup
2020-12-30 08:31:45 +03:00
Nikita Mikhailov
07e9a25bd8
style
2020-12-29 04:19:57 +03:00
Nikita Mikhailov
c0eef84c50
better
2020-12-29 04:15:26 +03:00
Nikita Mikhailov
c3288c3fbf
Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format
2020-12-28 15:09:37 +03:00
Anton Popov
57a1642035
fix race in aggregation with combinator distinct
2020-12-22 14:30:29 +03:00
Nikita Mikhaylov
0a508c7b8a
save
2020-12-15 00:56:46 +03:00
Nikolai Kochetov
40f62719ff
Move event to stack.
2020-10-15 13:24:18 +03:00
Nikolai Kochetov
0e412686bc
Better comments.
2020-09-30 11:25:22 +03:00
Nikolai Kochetov
727289cb09
Destroy resurces captured by lambda after ThreadFromGlobalPool::join().
2020-09-29 23:43:02 +03:00
Nikolai Kochetov
a2c70c4611
Destroy resurces captured by lambda after ThreadFromGlobalPool::join().
2020-09-29 22:11:40 +03:00
Nikolai Kochetov
a7e7fd084f
Destroy resurces captured by lambda after ThreadFromGlobalPool::join().
2020-09-29 13:48:11 +03:00
Vitaly Baranov
668653600c
Use SettingMaxThreads only in Settings, call getNumberOfPhysicalCPUCores() instead of SettingMaxThreads::getAuto().
2020-07-31 19:11:27 +03:00
Alexander Kuzmenkov
96d2e9c997
Initialize GlobalThreadPool explicitly
2020-06-22 22:04:12 +03:00
Bharat Nallan
c43bd228ab
make max global thread pool setting configurable
...
This PR adds a server level config for overriding the default max number
of threads in global thread pool that is currently allowed (10,000).
This might be useful in scenarios where there are a large number of
distributed queries that are executing concurrently and where the
default number of max threads might not be necessarily be sufficient.
2020-06-15 22:04:30 -07:00
Ivan Lezhankin
06446b4f08
dbms/ → src/
2020-04-03 18:14:31 +03:00