add 03008_deduplication_rundom_setttings.sh

This commit is contained in:
Sema Checherinda 2024-07-18 19:31:49 +02:00
parent 423fa9ca26
commit f50538c596
8 changed files with 87 additions and 6 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage, no-s3-storage
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage, no-s3-storage
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage, no-s3-storage
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage, no-s3-storage
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh

View File

@ -0,0 +1,3 @@
insert_several_blocks_into_table OK
mv_generates_several_blocks OK
several_mv_into_one_table OK

View File

@ -0,0 +1,78 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
ENGINE="ReplicatedMergeTree"
engine_options=("ReplicatedMergeTree" "MergeTree")
engine=${engine_options[ $RANDOM % ${#engine_options[@]} ]}
insert_method_option=("InsertSelect" "InsertValues")
insert_method=${insert_method_option[ $RANDOM % ${#insert_method_option[@]} ]}
use_insert_token_option=("True" "False")
use_insert_token=${use_insert_token_option[ $RANDOM % ${#use_insert_token_option[@]} ]}
single_thread_options=("True" "False")
single_thread=${single_thread_options[ $RANDOM % ${#single_thread_options[@]} ]}
deduplicate_src_table_options=("True" "False")
deduplicate_src_table=${deduplicate_src_table_options[ $RANDOM % ${#deduplicate_src_table_options[@]} ]}
deduplicate_dst_table_options=("True" "False")
deduplicate_dst_table=${deduplicate_dst_table_options[ $RANDOM % ${#deduplicate_dst_table_options[@]} ]}
insert_unique_blocks_options=("True" "False")
insert_unique_blocks=${insert_unique_blocks_options[ $RANDOM % ${#insert_unique_blocks_options[@]} ]}
THIS_RUN="Test case:"
THIS_RUN+=" insert_method=$insert_method"
THIS_RUN+=" engine=$ENGINE"
THIS_RUN+=" use_insert_token=$use_insert_token"
THIS_RUN+=" single_thread=$single_thread"
THIS_RUN+=" deduplicate_src_table=$deduplicate_src_table"
THIS_RUN+=" deduplicate_dst_table=$deduplicate_dst_table"
THIS_RUN+=" insert_unique_blocks=$insert_unique_blocks"
$CLICKHOUSE_CLIENT --max_insert_block_size 1 -nmq "
$(python3 $CURDIR/03008_deduplication.python insert_several_blocks_into_table \
--insert-method $insert_method \
--table-engine $ENGINE \
--use-insert-token $use_insert_token \
--single-thread $single_thread \
--deduplicate-src-table $deduplicate_src_table \
--deduplicate-dst-table $deduplicate_dst_table \
--insert-unique-blocks $insert_unique_blocks \
--get-logs false \
)
" 1>/dev/null 2>&1 && echo 'insert_several_blocks_into_table OK' || echo "FAIL: insert_several_blocks_into_table ${THIS_RUN}"
$CLICKHOUSE_CLIENT --max_insert_block_size 1 -nmq "
$(python3 $CURDIR/03008_deduplication.python mv_generates_several_blocks \
--insert-method $insert_method \
--table-engine $ENGINE \
--use-insert-token $use_insert_token \
--single-thread $single_thread \
--deduplicate-src-table $deduplicate_src_table \
--deduplicate-dst-table $deduplicate_dst_table \
--insert-unique-blocks $insert_unique_blocks \
--get-logs false \
)
" 1>/dev/null 2>&1 && echo 'mv_generates_several_blocks OK' || echo "FAIL: mv_generates_several_blocks ${THIS_RUN}"
$CLICKHOUSE_CLIENT --max_insert_block_size 1 -nmq "
$(python3 $CURDIR/03008_deduplication.python several_mv_into_one_table \
--insert-method $insert_method \
--table-engine $ENGINE \
--use-insert-token $use_insert_token \
--single-thread $single_thread \
--deduplicate-src-table $deduplicate_src_table \
--deduplicate-dst-table $deduplicate_dst_table \
--insert-unique-blocks $insert_unique_blocks \
--get-logs false \
)
" 1>/dev/null 2>&1 && echo 'several_mv_into_one_table OK' || echo "FAIL: several_mv_into_one_table ${THIS_RUN}"

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage, no-s3-storage
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage
# Tags: long, no-fasttest, no-parallel, no-azure-blob-storage, no-s3-storage
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh