mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #54904 from ClickHouse/pufit/fix-s3-division-by-zero
Fix division by zero in StorageS3
This commit is contained in:
commit
50253f23fd
@ -1085,7 +1085,7 @@ Pipe StorageS3::read(
|
||||
&& local_context->getSettingsRef().optimize_count_from_files;
|
||||
|
||||
const size_t max_threads = local_context->getSettingsRef().max_threads;
|
||||
const size_t max_parsing_threads = num_streams >= max_threads ? 1 : (max_threads / num_streams);
|
||||
const size_t max_parsing_threads = num_streams >= max_threads ? 1 : (max_threads / std::max(num_streams, 1ul));
|
||||
LOG_DEBUG(&Poco::Logger::get("StorageS3"), "Reading in {} streams, {} threads per stream", num_streams, max_parsing_threads);
|
||||
|
||||
pipes.reserve(num_streams);
|
||||
|
Loading…
Reference in New Issue
Block a user