mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
more debug info
This commit is contained in:
parent
0256e313b3
commit
9dd742cc29
@ -632,6 +632,7 @@ def run_tests_array(all_tests_with_params):
|
||||
open(stdout_file).read().split('\n')[:100])
|
||||
status += '\n'
|
||||
|
||||
status += "\nstdout:\n{}\n".format(stdout)
|
||||
status += 'Database: ' + testcase_args.testcase_database
|
||||
|
||||
elif stderr:
|
||||
|
@ -1,2 +1,2 @@
|
||||
Replication did not hang: synced all replicas of alter_table
|
||||
0 1
|
||||
Consistency: 1
|
||||
|
@ -1,2 +1,2 @@
|
||||
Replication did not hang: synced all replicas of alter_table_
|
||||
0 1
|
||||
Consistency: 1
|
||||
|
@ -2,7 +2,7 @@ Starting alters
|
||||
Finishing alters
|
||||
Equal number of columns
|
||||
Replication did not hang: synced all replicas of concurrent_alter_add_drop_
|
||||
0 1
|
||||
Consistency: 1
|
||||
0
|
||||
0
|
||||
0
|
||||
|
@ -6,7 +6,7 @@
|
||||
Starting alters
|
||||
Finishing alters
|
||||
Replication did not hang: synced all replicas of concurrent_alter_mt_
|
||||
0 1
|
||||
Consistency: 1
|
||||
1
|
||||
0
|
||||
1
|
||||
|
@ -1,3 +1,3 @@
|
||||
Replication did not hang: synced all replicas of dst_
|
||||
0 1
|
||||
Consistency: 1
|
||||
Replication did not hang: synced all replicas of src_
|
||||
|
@ -15,4 +15,4 @@ Metadata version on replica 5 equal with first replica, OK
|
||||
CREATE TABLE default.concurrent_kill_5\n(\n `key` UInt64,\n `value` Int64\n)\nENGINE = ReplicatedMergeTree(\'/clickhouse/tables/01593_concurrent_alter_mutations_kill_many_replicas_long_default/{shard}\', \'{replica}5\')\nORDER BY key\nSETTINGS max_replicated_mutations_in_queue = 1000, number_of_free_entries_in_pool_to_execute_mutation = 0, max_replicated_merges_in_queue = 1000, index_granularity = 8192
|
||||
499999500000
|
||||
Replication did not hang: synced all replicas of concurrent_kill_
|
||||
0 1
|
||||
Consistency: 1
|
||||
|
@ -1,3 +1,3 @@
|
||||
Replication did not hang: synced all replicas of ttl_table
|
||||
0 1
|
||||
Consistency: 1
|
||||
1
|
||||
|
@ -8,7 +8,8 @@ function try_sync_replicas()
|
||||
for t in "${tables_arr[@]}"
|
||||
do
|
||||
# The size of log may be big, so increase timeout.
|
||||
$CLICKHOUSE_CLIENT --receive_timeout 300 -q "SYSTEM SYNC REPLICA $t" &
|
||||
$CLICKHOUSE_CLIENT --receive_timeout 400 -q "SYSTEM SYNC REPLICA $t" || $CLICKHOUSE_CLIENT -q \
|
||||
"select 'sync failed, queue:', * from system.replication_queue where database=currentDatabase() and table='$t'" &
|
||||
done
|
||||
wait
|
||||
echo "Replication did not hang: synced all replicas of $1"
|
||||
@ -24,21 +25,23 @@ function check_replication_consistency()
|
||||
|
||||
try_sync_replicas "$1"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q \
|
||||
res=$($CLICKHOUSE_CLIENT -q \
|
||||
"SELECT
|
||||
throwIf((countDistinct(data) AS c) != 1, 'Replicas have diverged'), c
|
||||
countDistinct(data)
|
||||
FROM
|
||||
(
|
||||
SELECT _table, ($2) AS data
|
||||
FROM merge(currentDatabase(), '$1') GROUP BY _table
|
||||
)"
|
||||
res=$?
|
||||
if [ $res -ne 0 ]; then
|
||||
echo "Replicas have diverged"
|
||||
$CLICKHOUSE_CLIENT -q "select _table, $2, arraySort(groupArrayDistinct(_part)) from merge(currentDatabase(), '$1') group by _table"
|
||||
$CLICKHOUSE_CLIENT -q "select * from system.replication_queue where database=currentDatabase() and table like '$1%'"
|
||||
$CLICKHOUSE_CLIENT -q "select * from system.mutations where database=currentDatabase() and table like '$1%'"
|
||||
$CLICKHOUSE_CLIENT -q "select * from system.parts where database=currentDatabase() and table like '$1%'"
|
||||
)")
|
||||
|
||||
echo "Consistency: $res"
|
||||
if [ $res -ne 1 ]; then
|
||||
echo "Replicas have diverged:"
|
||||
$CLICKHOUSE_CLIENT -q "select 'data', _table, $2, arraySort(groupArrayDistinct(_part)) from merge(currentDatabase(), '$1') group by _table"
|
||||
$CLICKHOUSE_CLIENT -q "select 'queue', * from system.replication_queue where database=currentDatabase() and table like '$1%'"
|
||||
$CLICKHOUSE_CLIENT -q "select 'mutations', * from system.mutations where database=currentDatabase() and table like '$1%'"
|
||||
$CLICKHOUSE_CLIENT -q "select 'parts', * from system.parts where database=currentDatabase() and table like '$1%'"
|
||||
echo "Good luck with debugging..."
|
||||
fi
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user