Commit Graph

1 Commits

Author SHA1 Message Date
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