Commit Graph

2 Commits

Author SHA1 Message Date
robot-clickhouse
7c6ce8611c Automatic style fix 2024-09-27 10:19:49 +00:00
Sean Haynes
dc677f0f18 Use scheduleOrThrow in MergeTree data selector thread pool
At the moment, the use of scheduleOrThrowOnError doesn't currently
have a timeout. So if you reach a point of saturation and use all
threads available in the global pool, threads block infinitely
and lead to a deadlock.

This changes that behaviour so that MergeTree data selector threads
will have a timeout and return a "No threads available" exception
to clients.

Credit to Nikita Mikhaylov for the proposition here:

https://github.com/ClickHouse/ClickHouse/pull/56431
2024-03-22 16:46:20 +00:00