Don't fall-back to in-order pool when max_streams = 1 for remote fs (#57334)

* impl

* update tests

* update one more test
This commit is contained in:
Nikita Taranov 2023-12-01 21:39:26 +01:00 committed by GitHub
parent 8a68d51261
commit 2362bb2cc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 3 deletions

View File

@ -612,7 +612,8 @@ Pipe ReadFromMergeTree::read(
if (read_type == ReadType::ParallelReplicas)
return readFromPoolParallelReplicas(std::move(parts_with_range), std::move(required_columns), std::move(pool_settings));
if (read_type == ReadType::Default && max_streams > 1)
/// Reading from default thread pool is beneficial for remote storage because of new prefetches.
if (read_type == ReadType::Default && (max_streams > 1 || checkAllPartsOnRemoteFS(parts_with_range)))
return readFromPool(std::move(parts_with_range), std::move(required_columns), std::move(pool_settings));
auto pipe = readInOrder(parts_with_range, required_columns, pool_settings, read_type, /*limit=*/ 0);

View File

@ -1,5 +1,6 @@
-- Tags: no-random-merge-tree-settings, no-tsan, no-debug
-- Tags: no-random-merge-tree-settings, no-tsan, no-debug, no-s3-storage
-- no-tsan: too slow
-- no-s3-storage: for remote tables we use thread pool even when reading with one stream, so memory consumption is higher
SET use_uncompressed_cache = 0;
SET allow_prefetched_read_pool_for_remote_filesystem=0;

View File

@ -1,3 +1,5 @@
-- Tags: no-s3-storage
drop table if exists data_02233;
create table data_02233 (parent_key Int, child_key Int, value Int) engine=MergeTree() order by parent_key;

View File

@ -1,3 +1,5 @@
-- Tags: no-s3-storage
-- produces different pipeline if enabled
set enable_memory_bound_merging_of_aggregation_results = 0;

View File

@ -1,4 +1,4 @@
-- Tags: long
-- Tags: long, no-s3-storage
set max_threads = 16;
set allow_aggregate_partitions_independently = 1;

View File

@ -1,3 +1,5 @@
-- Tags: no-s3-storage
DROP TABLE IF EXISTS test_grouping_sets_predicate;
CREATE TABLE test_grouping_sets_predicate

View File

@ -1,3 +1,5 @@
-- Tags: no-s3-storage
drop table if exists t;
create table t(a UInt64) engine=MergeTree order by tuple();