forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ClickHouse#59448 from nickitat/insert_with_max_ins…
…ert_threads_into_remote_tables More parallel insert-select pipeline
- Loading branch information
Showing
15 changed files
with
88 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/queries/0_stateless/00047_stored_aggregates_complex.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/queries/0_stateless/02428_combinators_with_over_statement.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
tests/queries/0_stateless/02981_insert_select_resize_to_max_insert_threads.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
inserting into a remote table from local with concurrency equal to max_insert_threads | ||
9 | ||
inserting into a remote table from remote with concurrency max_insert_threads | ||
9 | ||
inserting into a remote table from remote (reading with parallel replicas) with concurrency max_insert_threads | ||
9 |
56 changes: 56 additions & 0 deletions
56
tests/queries/0_stateless/02981_insert_select_resize_to_max_insert_threads.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/usr/bin/env bash | ||
# Tags: no-random-settings | ||
|
||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
# shellcheck source=../shell_config.sh | ||
. "$CURDIR"/../shell_config.sh | ||
|
||
|
||
${CLICKHOUSE_CLIENT} -nq """ | ||
CREATE TABLE t1_local | ||
( | ||
n UInt64, | ||
) | ||
ENGINE = MergeTree | ||
ORDER BY n; | ||
CREATE TABLE t3_dist | ||
( | ||
n UInt64, | ||
) | ||
ENGINE = Distributed('test_cluster_two_shards', currentDatabase(), 't1_local', rand()); | ||
CREATE TABLE t4_pr | ||
( | ||
n UInt64, | ||
) | ||
ENGINE = ReplicatedMergeTree('/clickhouse/tables/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/02981_insert_select', '1') | ||
ORDER BY n; | ||
SYSTEM STOP MERGES t1_local; | ||
INSERT INTO t1_local SELECT * FROM numbers_mt(1e6); | ||
""" | ||
|
||
max_insert_threads=9 | ||
|
||
echo "inserting into a remote table from local with concurrency equal to max_insert_threads" | ||
${CLICKHOUSE_CLIENT} --max_insert_threads "$max_insert_threads" -q """ | ||
EXPLAIN PIPELINE | ||
INSERT INTO t3_dist | ||
SELECT * FROM t1_local; | ||
""" | grep -v EmptySink | grep -c Sink | ||
|
||
echo "inserting into a remote table from remote with concurrency max_insert_threads" | ||
${CLICKHOUSE_CLIENT} --max_insert_threads "$max_insert_threads" --parallel_distributed_insert_select 0 -q """ | ||
EXPLAIN PIPELINE | ||
INSERT INTO t3_dist | ||
SELECT * FROM t3_dist; | ||
""" | grep -v EmptySink | grep -c Sink | ||
|
||
echo "inserting into a remote table from remote (reading with parallel replicas) with concurrency max_insert_threads" | ||
${CLICKHOUSE_CLIENT} --max_insert_threads "$max_insert_threads" --allow_experimental_parallel_reading_from_replicas 2 --cluster_for_parallel_replicas 'parallel_replicas' --max_parallel_replicas 3 -q """ | ||
EXPLAIN PIPELINE | ||
INSERT INTO t3_dist | ||
SELECT * FROM t4_pr; | ||
""" | grep -v EmptySink | grep -c Sink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters