未验证 提交 8663d04b 编写于 作者: A Alexander Kuzmenkov 提交者: GitHub

Merge pull request #19298 from ClickHouse/aku/parallel-tests

Avoid mixing output from parallel test runs
...@@ -274,7 +274,9 @@ def run_tests_array(all_tests_with_params): ...@@ -274,7 +274,9 @@ def run_tests_array(all_tests_with_params):
def print_test_time(test_time): def print_test_time(test_time):
if args.print_time: if args.print_time:
print(" {0:.2f} sec.".format(test_time), end='') return " {0:.2f} sec.".format(test_time)
else:
return ''
if len(all_tests): if len(all_tests):
print("\nRunning {} {} tests.".format(len(all_tests), suite) + "\n") print("\nRunning {} {} tests.".format(len(all_tests), suite) + "\n")
...@@ -291,36 +293,43 @@ def run_tests_array(all_tests_with_params): ...@@ -291,36 +293,43 @@ def run_tests_array(all_tests_with_params):
(name, ext) = os.path.splitext(case) (name, ext) = os.path.splitext(case)
try: try:
status = ''
is_concurrent = multiprocessing.current_process().name != "MainProcess";
if not is_concurrent:
sys.stdout.flush() sys.stdout.flush()
sys.stdout.write("{0:72}".format(name + ": ")) sys.stdout.write("{0:72}".format(name + ": "))
# This flush is needed so you can see the test name of the long running test before it will finish. # This flush is needed so you can see the test name of the long
# running test before it will finish. But don't do it in parallel
# mode, so that the lines don't mix.
sys.stdout.flush() sys.stdout.flush()
else:
status = "{0:72}".format(name + ": ");
if args.skip and any(s in name for s in args.skip): if args.skip and any(s in name for s in args.skip):
print(MSG_SKIPPED + " - skip") status += MSG_SKIPPED + " - skip\n"
skipped_total += 1 skipped_total += 1
elif not args.zookeeper and ('zookeeper' in name elif not args.zookeeper and ('zookeeper' in name
or 'replica' in name): or 'replica' in name):
print(MSG_SKIPPED + " - no zookeeper") status += MSG_SKIPPED + " - no zookeeper\n"
skipped_total += 1 skipped_total += 1
elif not args.shard and ('shard' in name elif not args.shard and ('shard' in name
or 'distributed' in name or 'distributed' in name
or 'global' in name): or 'global' in name):
print(MSG_SKIPPED + " - no shard") status += MSG_SKIPPED + " - no shard\n"
skipped_total += 1 skipped_total += 1
elif not args.no_long and ('long' in name elif not args.no_long and ('long' in name
# Tests for races and deadlocks usually are runned in loop # Tests for races and deadlocks usually are runned in loop
# for significant amount of time # for significant amount of time
or 'deadlock' in name or 'deadlock' in name
or 'race' in name): or 'race' in name):
print(MSG_SKIPPED + " - no long") status += MSG_SKIPPED + " - no long\n"
skipped_total += 1 skipped_total += 1
else: else:
disabled_file = os.path.join(suite_dir, name) + '.disabled' disabled_file = os.path.join(suite_dir, name) + '.disabled'
if os.path.exists(disabled_file) and not args.disabled: if os.path.exists(disabled_file) and not args.disabled:
message = open(disabled_file, 'r').read() message = open(disabled_file, 'r').read()
print(MSG_SKIPPED + " - " + message) status += MSG_SKIPPED + " - " + message + "\n"
else: else:
if args.testname: if args.testname:
...@@ -347,11 +356,11 @@ def run_tests_array(all_tests_with_params): ...@@ -347,11 +356,11 @@ def run_tests_array(all_tests_with_params):
raise raise
failures += 1 failures += 1
print(MSG_FAIL, end='') status += MSG_FAIL
print_test_time(total_time) status += print_test_time(total_time)
print(" - Timeout!") status += " - Timeout!\n"
if stderr: if stderr:
print(stderr) status += stderr
else: else:
counter = 1 counter = 1
while proc.returncode != 0 and need_retry(stderr): while proc.returncode != 0 and need_retry(stderr):
...@@ -364,12 +373,12 @@ def run_tests_array(all_tests_with_params): ...@@ -364,12 +373,12 @@ def run_tests_array(all_tests_with_params):
if proc.returncode != 0: if proc.returncode != 0:
failures += 1 failures += 1
failures_chain += 1 failures_chain += 1
print(MSG_FAIL, end='') status += MSG_FAIL
print_test_time(total_time) status += print_test_time(total_time)
print(" - return code {}".format(proc.returncode)) status += ' - return code {}\n'.format(proc.returncode)
if stderr: if stderr:
print(stderr) status += stderr
# Stop on fatal errors like segmentation fault. They are sent to client via logs. # Stop on fatal errors like segmentation fault. They are sent to client via logs.
if ' <Fatal> ' in stderr: if ' <Fatal> ' in stderr:
...@@ -379,46 +388,51 @@ def run_tests_array(all_tests_with_params): ...@@ -379,46 +388,51 @@ def run_tests_array(all_tests_with_params):
SERVER_DIED = True SERVER_DIED = True
if os.path.isfile(stdout_file): if os.path.isfile(stdout_file):
print(", result:\n") status += ", result:\n\n"
print('\n'.join(open(stdout_file).read().split('\n')[:100])) status += '\n'.join(
open(stdout_file).read().split('\n')[:100])
status += '\n';
elif stderr: elif stderr:
failures += 1 failures += 1
failures_chain += 1 failures_chain += 1
print(MSG_FAIL, end='') status += MSG_FAIL
print_test_time(total_time) status += print_test_time(total_time)
print(" - having stderror:\n{}".format( status += " - having stderror:\n{}\n".format(
'\n'.join(stderr.split('\n')[:100]))) '\n'.join(stderr.split('\n')[:100]))
elif 'Exception' in stdout: elif 'Exception' in stdout:
failures += 1 failures += 1
failures_chain += 1 failures_chain += 1
print(MSG_FAIL, end='') status += MSG_FAIL
print_test_time(total_time) status += print_test_time(total_time)
print(" - having exception:\n{}".format( status += " - having exception:\n{}\n".format(
'\n'.join(stdout.split('\n')[:100]))) '\n'.join(stdout.split('\n')[:100]))
elif not os.path.isfile(reference_file): elif not os.path.isfile(reference_file):
print(MSG_UNKNOWN, end='') status += MSG_UNKNOWN
print_test_time(total_time) status += print_test_time(total_time)
print(" - no reference file") status += " - no reference file\n"
else: else:
result_is_different = subprocess.call(['diff', '-q', reference_file, stdout_file], stdout=PIPE) result_is_different = subprocess.call(['diff', '-q', reference_file, stdout_file], stdout=PIPE)
if result_is_different: if result_is_different:
diff = Popen(['diff', '-U', str(args.unified), reference_file, stdout_file], stdout=PIPE, universal_newlines=True).communicate()[0] diff = Popen(['diff', '-U', str(args.unified), reference_file, stdout_file], stdout=PIPE, universal_newlines=True).communicate()[0]
failures += 1 failures += 1
print(MSG_FAIL, end='') status += MSG_FAIL
print_test_time(total_time) status += print_test_time(total_time)
print(" - result differs with reference:\n{}".format(diff)) status += " - result differs with reference:\n{}\n".format(diff)
else: else:
passed_total += 1 passed_total += 1
failures_chain = 0 failures_chain = 0
print(MSG_OK, end='') status += MSG_OK
print_test_time(total_time) status += print_test_time(total_time)
print() status += "\n"
if os.path.exists(stdout_file): if os.path.exists(stdout_file):
os.remove(stdout_file) os.remove(stdout_file)
if os.path.exists(stderr_file): if os.path.exists(stderr_file):
os.remove(stderr_file) os.remove(stderr_file)
sys.stdout.write(status)
sys.stdout.flush()
except KeyboardInterrupt as e: except KeyboardInterrupt as e:
print(colored("Break tests execution", args, "red")) print(colored("Break tests execution", args, "red"))
raise e raise e
......
122 122
Table dictdb.dict_invalidate doesn\'t exist Table dictdb_01041_01040.dict_invalidate doesn\'t exist
133 133
...@@ -5,12 +5,12 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) ...@@ -5,12 +5,12 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh . "$CURDIR"/../shell_config.sh
$CLICKHOUSE_CLIENT --query "DROP DATABASE IF EXISTS dictdb" $CLICKHOUSE_CLIENT --query "DROP DATABASE IF EXISTS dictdb_01041_01040"
$CLICKHOUSE_CLIENT --query "CREATE DATABASE dictdb" $CLICKHOUSE_CLIENT --query "CREATE DATABASE dictdb_01041_01040"
$CLICKHOUSE_CLIENT --query " $CLICKHOUSE_CLIENT --query "
CREATE TABLE dictdb.dict_invalidate CREATE TABLE dictdb_01041_01040.dict_invalidate
ENGINE = Memory AS ENGINE = Memory AS
SELECT SELECT
122 as dummy, 122 as dummy,
...@@ -19,31 +19,31 @@ FROM system.one" ...@@ -19,31 +19,31 @@ FROM system.one"
$CLICKHOUSE_CLIENT --query " $CLICKHOUSE_CLIENT --query "
CREATE DICTIONARY dictdb.invalidate CREATE DICTIONARY dictdb_01041_01040.invalidate
( (
dummy UInt64, dummy UInt64,
two UInt8 EXPRESSION dummy two UInt8 EXPRESSION dummy
) )
PRIMARY KEY dummy PRIMARY KEY dummy
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dict_invalidate' DB 'dictdb' INVALIDATE_QUERY 'select max(last_time) from dictdb.dict_invalidate')) SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dict_invalidate' DB 'dictdb_01041_01040' INVALIDATE_QUERY 'select max(last_time) from dictdb_01041_01040.dict_invalidate'))
LIFETIME(MIN 0 MAX 1) LIFETIME(MIN 0 MAX 1)
LAYOUT(FLAT())" LAYOUT(FLAT())"
$CLICKHOUSE_CLIENT --query "SELECT dictGetUInt8('dictdb.invalidate', 'two', toUInt64(122))" $CLICKHOUSE_CLIENT --query "SELECT dictGetUInt8('dictdb_01041_01040.invalidate', 'two', toUInt64(122))"
# No exception happened # No exception happened
$CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb' AND name = 'invalidate'" $CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'"
$CLICKHOUSE_CLIENT --query "DROP TABLE dictdb.dict_invalidate" $CLICKHOUSE_CLIENT --query "DROP TABLE dictdb_01041_01040.dict_invalidate"
function check_exception_detected() function check_exception_detected()
{ {
query_result=$($CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb' AND name = 'invalidate'" 2>&1) query_result=$($CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'" 2>&1)
while [ -z "$query_result" ] while [ -z "$query_result" ]
do do
query_result=$($CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb' AND name = 'invalidate'" 2>&1) query_result=$($CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'" 2>&1)
sleep 0.1 sleep 0.1
done done
} }
...@@ -52,10 +52,10 @@ function check_exception_detected() ...@@ -52,10 +52,10 @@ function check_exception_detected()
export -f check_exception_detected; export -f check_exception_detected;
timeout 30 bash -c check_exception_detected 2> /dev/null timeout 30 bash -c check_exception_detected 2> /dev/null
$CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb' AND name = 'invalidate'" 2>&1 | grep -Eo "Table dictdb.dict_invalidate .* exist" $CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'" 2>&1 | grep -Eo "Table dictdb_01041_01040.dict_invalidate .* exist"
$CLICKHOUSE_CLIENT --query " $CLICKHOUSE_CLIENT --query "
CREATE TABLE dictdb.dict_invalidate CREATE TABLE dictdb_01041_01040.dict_invalidate
ENGINE = Memory AS ENGINE = Memory AS
SELECT SELECT
133 as dummy, 133 as dummy,
...@@ -64,11 +64,11 @@ FROM system.one" ...@@ -64,11 +64,11 @@ FROM system.one"
function check_exception_fixed() function check_exception_fixed()
{ {
query_result=$($CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb' AND name = 'invalidate'" 2>&1) query_result=$($CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'" 2>&1)
while [ "$query_result" ] while [ "$query_result" ]
do do
query_result=$($CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb' AND name = 'invalidate'" 2>&1) query_result=$($CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'" 2>&1)
sleep 0.1 sleep 0.1
done done
} }
...@@ -77,7 +77,7 @@ export -f check_exception_fixed; ...@@ -77,7 +77,7 @@ export -f check_exception_fixed;
# it may take a while until dictionary reloads # it may take a while until dictionary reloads
timeout 60 bash -c check_exception_fixed 2> /dev/null timeout 60 bash -c check_exception_fixed 2> /dev/null
$CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb' AND name = 'invalidate'" 2>&1 $CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'" 2>&1
$CLICKHOUSE_CLIENT --query "SELECT dictGetUInt8('dictdb.invalidate', 'two', toUInt64(133))" $CLICKHOUSE_CLIENT --query "SELECT dictGetUInt8('dictdb_01041_01040.invalidate', 'two', toUInt64(133))"
$CLICKHOUSE_CLIENT --query "DROP DATABASE IF EXISTS dictdb" $CLICKHOUSE_CLIENT --query "DROP DATABASE IF EXISTS dictdb_01041_01040"
...@@ -8,40 +8,40 @@ set -e -o pipefail ...@@ -8,40 +8,40 @@ set -e -o pipefail
# Run the client. # Run the client.
$CLICKHOUSE_CLIENT --multiquery <<'EOF' $CLICKHOUSE_CLIENT --multiquery <<'EOF'
DROP DATABASE IF EXISTS dictdb; DROP DATABASE IF EXISTS dictdb_01042;
CREATE DATABASE dictdb; CREATE DATABASE dictdb_01042;
CREATE TABLE dictdb.table(x Int64, y Int64, insert_time DateTime) ENGINE = MergeTree ORDER BY tuple(); CREATE TABLE dictdb_01042.table(x Int64, y Int64, insert_time DateTime) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO dictdb.table VALUES (12, 102, now()); INSERT INTO dictdb_01042.table VALUES (12, 102, now());
CREATE DICTIONARY dictdb.dict CREATE DICTIONARY dictdb_01042.dict
( (
x Int64 DEFAULT -1, x Int64 DEFAULT -1,
y Int64 DEFAULT -1, y Int64 DEFAULT -1,
insert_time DateTime insert_time DateTime
) )
PRIMARY KEY x PRIMARY KEY x
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'table' DB 'dictdb' UPDATE_FIELD 'insert_time')) SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'table' DB 'dictdb_01042' UPDATE_FIELD 'insert_time'))
LAYOUT(FLAT()) LAYOUT(FLAT())
LIFETIME(1); LIFETIME(1);
EOF EOF
$CLICKHOUSE_CLIENT --query "SELECT '12 -> ', dictGetInt64('dictdb.dict', 'y', toUInt64(12))" $CLICKHOUSE_CLIENT --query "SELECT '12 -> ', dictGetInt64('dictdb_01042.dict', 'y', toUInt64(12))"
$CLICKHOUSE_CLIENT --query "INSERT INTO dictdb.table VALUES (13, 103, now())" $CLICKHOUSE_CLIENT --query "INSERT INTO dictdb_01042.table VALUES (13, 103, now())"
$CLICKHOUSE_CLIENT --query "INSERT INTO dictdb.table VALUES (14, 104, now() - INTERVAL 1 DAY)" $CLICKHOUSE_CLIENT --query "INSERT INTO dictdb_01042.table VALUES (14, 104, now() - INTERVAL 1 DAY)"
while [ "$(${CLICKHOUSE_CLIENT} --query "SELECT dictGetInt64('dictdb.dict', 'y', toUInt64(13))")" = -1 ] while [ "$(${CLICKHOUSE_CLIENT} --query "SELECT dictGetInt64('dictdb_01042.dict', 'y', toUInt64(13))")" = -1 ]
do do
sleep 0.5 sleep 0.5
done done
$CLICKHOUSE_CLIENT --query "SELECT '13 -> ', dictGetInt64('dictdb.dict', 'y', toUInt64(13))" $CLICKHOUSE_CLIENT --query "SELECT '13 -> ', dictGetInt64('dictdb_01042.dict', 'y', toUInt64(13))"
$CLICKHOUSE_CLIENT --query "SELECT '14 -> ', dictGetInt64('dictdb.dict', 'y', toUInt64(14))" $CLICKHOUSE_CLIENT --query "SELECT '14 -> ', dictGetInt64('dictdb_01042.dict', 'y', toUInt64(14))"
$CLICKHOUSE_CLIENT --query "SYSTEM RELOAD DICTIONARY 'dictdb.dict'" $CLICKHOUSE_CLIENT --query "SYSTEM RELOAD DICTIONARY 'dictdb_01042.dict'"
$CLICKHOUSE_CLIENT --query "SELECT '12(r) -> ', dictGetInt64('dictdb.dict', 'y', toUInt64(12))" $CLICKHOUSE_CLIENT --query "SELECT '12(r) -> ', dictGetInt64('dictdb_01042.dict', 'y', toUInt64(12))"
$CLICKHOUSE_CLIENT --query "SELECT '13(r) -> ', dictGetInt64('dictdb.dict', 'y', toUInt64(13))" $CLICKHOUSE_CLIENT --query "SELECT '13(r) -> ', dictGetInt64('dictdb_01042.dict', 'y', toUInt64(13))"
$CLICKHOUSE_CLIENT --query "SELECT '14(r) -> ', dictGetInt64('dictdb.dict', 'y', toUInt64(14))" $CLICKHOUSE_CLIENT --query "SELECT '14(r) -> ', dictGetInt64('dictdb_01042.dict', 'y', toUInt64(14))"
$CLICKHOUSE_CLIENT --query "DROP DATABASE IF EXISTS dictdb" $CLICKHOUSE_CLIENT --query "DROP DATABASE IF EXISTS dictdb_01042"
DROP DATABASE IF EXISTS dictdb; DROP DATABASE IF EXISTS dictdb_01043;
CREATE DATABASE dictdb; CREATE DATABASE dictdb_01043;
CREATE TABLE dictdb.dicttbl(key Int64, value_default String, value_expression String) ENGINE = MergeTree ORDER BY tuple(); CREATE TABLE dictdb_01043.dicttbl(key Int64, value_default String, value_expression String) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO dictdb.dicttbl VALUES (12, 'hello', '55:66:77'); INSERT INTO dictdb_01043.dicttbl VALUES (12, 'hello', '55:66:77');
CREATE DICTIONARY dictdb.dict CREATE DICTIONARY dictdb_01043.dict
( (
key Int64 DEFAULT -1, key Int64 DEFAULT -1,
value_default String DEFAULT 'world', value_default String DEFAULT 'world',
...@@ -13,15 +13,15 @@ CREATE DICTIONARY dictdb.dict ...@@ -13,15 +13,15 @@ CREATE DICTIONARY dictdb.dict
) )
PRIMARY KEY key PRIMARY KEY key
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dicttbl' DB 'dictdb')) SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dicttbl' DB 'dictdb_01043'))
LAYOUT(FLAT()) LAYOUT(FLAT())
LIFETIME(1); LIFETIME(1);
SELECT dictGetString('dictdb.dict', 'value_default', toUInt64(12)); SELECT dictGetString('dictdb_01043.dict', 'value_default', toUInt64(12));
SELECT dictGetString('dictdb.dict', 'value_default', toUInt64(14)); SELECT dictGetString('dictdb_01043.dict', 'value_default', toUInt64(14));
SELECT dictGetString('dictdb.dict', 'value_expression', toUInt64(12)); SELECT dictGetString('dictdb_01043.dict', 'value_expression', toUInt64(12));
SELECT dictGetString('dictdb.dict', 'value_expression', toUInt64(14)); SELECT dictGetString('dictdb_01043.dict', 'value_expression', toUInt64(14));
DROP DATABASE IF EXISTS dictdb; DROP DATABASE IF EXISTS dictdb_01043;
DROP DATABASE IF EXISTS dictdb; DROP DATABASE IF EXISTS dictdb_01045;
CREATE DATABASE dictdb; CREATE DATABASE dictdb_01045;
CREATE DICTIONARY dictdb.restricted_dict ( CREATE DICTIONARY dictdb_01045.restricted_dict (
key UInt64, key UInt64,
value String value String
) )
...@@ -12,10 +12,10 @@ LIFETIME(MIN 0 MAX 1) ...@@ -12,10 +12,10 @@ LIFETIME(MIN 0 MAX 1)
LAYOUT(CACHE(SIZE_IN_CELLS 10)); LAYOUT(CACHE(SIZE_IN_CELLS 10));
-- because of lazy load we can check only in dictGet query -- because of lazy load we can check only in dictGet query
select dictGetString('dictdb.restricted_dict', 'value', toUInt64(1)); -- {serverError 482} select dictGetString('dictdb_01045.restricted_dict', 'value', toUInt64(1)); -- {serverError 482}
select 'Ok.'; select 'Ok.';
DROP DICTIONARY IF EXISTS dictdb.restricted_dict; DROP DICTIONARY IF EXISTS dictdb_01045.restricted_dict;
DROP DATABASE IF EXISTS dictdb; DROP DATABASE IF EXISTS dictdb_01045;
DROP TABLE IF EXISTS mt; DROP TABLE IF EXISTS mt_01451;
CREATE TABLE mt (v UInt8) ENGINE = MergeTree() order by tuple(); CREATE TABLE mt_01451 (v UInt8) ENGINE = MergeTree() order by tuple();
SYSTEM STOP MERGES mt; SYSTEM STOP MERGES mt_01451;
INSERT INTO mt VALUES (0); INSERT INTO mt_01451 VALUES (0);
INSERT INTO mt VALUES (1); INSERT INTO mt_01451 VALUES (1);
INSERT INTO mt VALUES (2); INSERT INTO mt_01451 VALUES (2);
SELECT v FROM mt ORDER BY v; SELECT v FROM mt_01451 ORDER BY v;
ALTER TABLE mt DETACH PART 'all_100_100_0'; -- { serverError 232 } ALTER TABLE mt_01451 DETACH PART 'all_100_100_0'; -- { serverError 232 }
ALTER TABLE mt DETACH PART 'all_2_2_0'; ALTER TABLE mt_01451 DETACH PART 'all_2_2_0';
SELECT v FROM mt ORDER BY v; SELECT v FROM mt_01451 ORDER BY v;
SELECT name FROM system.detached_parts WHERE table = 'mt'; SELECT name FROM system.detached_parts WHERE table = 'mt_01451';
ALTER TABLE mt ATTACH PART 'all_2_2_0'; ALTER TABLE mt_01451 ATTACH PART 'all_2_2_0';
SELECT v FROM mt ORDER BY v; SELECT v FROM mt_01451 ORDER BY v;
SELECT name FROM system.detached_parts WHERE table = 'mt'; SELECT name FROM system.detached_parts WHERE table = 'mt_01451';
SELECT '-- drop part --'; SELECT '-- drop part --';
ALTER TABLE mt DROP PART 'all_4_4_0'; ALTER TABLE mt_01451 DROP PART 'all_4_4_0';
ALTER TABLE mt ATTACH PART 'all_4_4_0'; -- { serverError 233 } ALTER TABLE mt_01451 ATTACH PART 'all_4_4_0'; -- { serverError 233 }
SELECT v FROM mt ORDER BY v; SELECT v FROM mt_01451 ORDER BY v;
SELECT '-- resume merges --'; SELECT '-- resume merges --';
SYSTEM START MERGES mt; SYSTEM START MERGES mt_01451;
OPTIMIZE TABLE mt FINAL; OPTIMIZE TABLE mt_01451 FINAL;
SELECT v FROM mt ORDER BY v; SELECT v FROM mt_01451 ORDER BY v;
SELECT name FROM system.parts WHERE table = 'mt' AND active; SELECT name FROM system.parts WHERE table = 'mt_01451' AND active;
DROP TABLE mt; DROP TABLE mt_01451;
...@@ -473,12 +473,15 @@ ...@@ -473,12 +473,15 @@
"01494_storage_join_persistency", "01494_storage_join_persistency",
"01516_drop_table_stress", "01516_drop_table_stress",
"01541_max_memory_usage_for_user", "01541_max_memory_usage_for_user",
"01646_system_restart_replicas_smoke", // system restart replicas is a global query
"01600_count_of_parts_metrics", // tests global system metrics
"attach", "attach",
"ddl_dictionaries", "ddl_dictionaries",
"dictionary", "dictionary",
"limit_memory", "limit_memory",
"live_view", "live_view",
"memory_leak", "memory_leak",
"memory_limit" "memory_limit",
"polygon_dicts" // they use an explicitly specified database
] ]
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册