Anton Popov
223adc1725
fix ThreadPool::wait
2023-05-05 19:14:45 +00:00
serxa
22b75ec81b
fix typo, add coment, dont reset trace
2023-04-13 15:17:39 +00:00
serxa
32f78afd7e
get rid of redundant code
2023-04-13 12:11:06 +00:00
serxa
ce2073e58f
detach_thread() and notifications order does not matter
2023-04-13 11:45:19 +00:00
serxa
5e8339c2d9
Lock ThreadPool mutex once per job instead of twice
2023-04-13 11:27:11 +00:00
Alexey Milovidov
e982fb9f1c
Merge pull request #47880 from azat/threadpool-introspection
...
ThreadPool metrics introspection
2023-03-30 01:27:31 +03:00
Frank Chen
87d235e842
Some improvements about names of span logs ( #47667 )
2023-03-29 16:28:36 +02:00
Azat Khuzhin
f38a7aeabe
ThreadPool metrics introspection
...
There are lots of thread pools and simple local-vs-global is not enough
already, it is good to know which one in particular uses threads.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-29 10:46:59 +02:00
Vitaly Baranov
4318212c73
Make a condition more clear.
2023-03-21 21:52:59 +01:00
Vitaly Baranov
096d0132af
More corrections.
2023-03-21 21:52:59 +01:00
Vitaly Baranov
0a0e9d060f
Corrections after review.
2023-03-21 21:52:59 +01:00
Vitaly Baranov
85d38493f6
Improve ThreadPool
...
ThreadPool::setMaxThreads() can now start new threads (if there are scheduled jobs in the queue for them);
ThreadPool::setMaxFreeThreads() can now finish free threads.
2023-03-21 21:52:59 +01:00
Anton Popov
839cd614fb
fix memory leak in azure sdk
2023-01-31 01:01:10 +00:00
Zhiguo Zhou
823cb8a8f0
Call std::condition_variable::notify_one w/o lock in ThreadPool
...
Calling notify_one function with lock held would let the notified
thread immediately block again, and increase the lock contention.
This commit moves the calls of notify_one function out of critical
sections of ThreadPool, whose lock (ThreadPoolImpl::mutex) is most
extensively contended in some workloads.
2022-12-21 13:50:03 +08: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
Frank Chen
d9a516288c
Resolve comments
2022-09-01 11:56:10 +08:00
Frank Chen
83cbdef3c6
Fix context re-initialization for ThreadPool
2022-08-30 12:26:23 +08:00
Frank Chen
92f7ca3616
Move TracingContextOnThread::current() out of class for simplicity
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-08-25 20:23:56 +08:00
Frank Chen
bb00dcc19b
Remove using namespace from header
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-08-25 20:20:13 +08:00
Frank Chen
03007606ba
Fix format
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-08-24 17:01:31 +08:00
Frank Chen
cd19366b44
Move classes into DB::OpenTelemetry namespace
2022-08-24 16:41:40 +08:00
Frank Chen
efc6a60a60
Clean code
2022-08-24 15:59:44 +08:00
Frank Chen
035896fa16
Fix build check
2022-08-02 20:18:42 +08:00
Frank Chen
da57a993e4
Fix CI
2022-07-09 13:43:10 +08:00
Frank Chen
93dc109e36
Fix code
2022-07-07 17:44:19 +08:00
Frank Chen
32931857f0
Propagate tracing context across threads
2022-07-07 17:41:43 +08:00
Robert Schulze
f692ead6ad
Don't use std::unique_lock unless we have to
...
Replace where possible by std::lock_guard which is more light-weight.
2022-06-28 19:19:06 +00:00
Robert Schulze
b24ca8de52
Fix various clang-tidy warnings
...
When I tried to add cool new clang-tidy 14 warnings, I noticed that the
current clang-tidy settings already produce a ton of warnings. This
commit addresses many of these. Almost all of them were non-critical,
i.e. C vs. C++ style casts.
2022-04-20 10:29:05 +02:00
Alexey Milovidov
ab80b94f45
Update ThreadPool.cpp
2022-04-13 15:18:49 +03:00
Alexey Milovidov
f0fad98a73
Reset thread name in thread pool
2022-04-11 01:03:24 +02:00
alexey-milovidov
a089f9918c
Update ThreadPool.cpp
2022-02-04 03:54:33 +03:00
Alexey Milovidov
78eebd5c7c
Fix parallel loading of data parts
2022-02-04 02:29:46 +03:00
Tomáš Hromada
445b0ba7cc
Expose all GlobalThreadPool config params ( #31285 )
2021-11-12 16:24:47 +03:00
Nikita Mikhaylov
c52b8ec083
Introduced MergeTask and MutateTask ( #25165 )
...
Introduced MergeTask and MutateTask
2021-09-17 00:19:58 +03:00
Nikita Mikhaylov
8a0765c60d
Review fixes (partially)
2021-09-07 12:45:39 +00:00
Nikita Mikhaylov
74c0b61e53
Better
2021-09-06 18:33:31 +00:00
Nikita Mikhaylov
0249015515
added priority queue
2021-09-06 11:37:51 +00:00
Nikita Mikhaylov
25a879044b
Allow allocations to allocate a thread
2021-09-04 17:23:05 +00:00
Nikita Mikhaylov
cc7c221fad
Own PriorityQueue + prettifying the code
2021-09-02 21:31:32 +00:00
Alexey Milovidov
ba45bd834f
Close #27816
2021-08-19 11:22:57 +03:00
alexey-milovidov
a27808be98
Revert "Do not miss exceptions from the ThreadPool"
2021-08-19 11:17:47 +03:00
Azat Khuzhin
83d871b701
Do not miss exceptions from the ThreadPool
2021-08-08 19:25:43 +03:00
Azat Khuzhin
e3cbd4a5df
Improve "Cannot schedule a task" error message
2021-05-31 10:24:05 +03:00
Nikita Mikhaylov
da496cba01
Update ThreadPool.cpp
2021-05-25 15:58:04 +03:00
Nikita Mikhaylov
ba6595cd17
add more comments
2021-05-25 14:59:29 +03:00
Nikita Mikhaylov
343d30002d
done
2021-05-25 14:59:29 +03:00
Azat Khuzhin
590a6b9855
Add ThreadPool::finished()
2021-04-28 22:33:29 +03:00
Alexander Tokmakov
73e96250a8
add comments
2021-01-13 15:19:41 +03:00
Alexander Tokmakov
ff6c3c75c2
add protection from unsafe allocations
2021-01-12 18:41:24 +03:00
Anton Popov
57a1642035
fix race in aggregation with combinator distinct
2020-12-22 14:30:29 +03:00