Fix another cause of flakiness

This commit is contained in:
Alexey Milovidov 2021-07-21 04:05:56 +03:00
parent d815023700
commit f62fc8c43d
2 changed files with 4 additions and 3 deletions

View File

@ -663,7 +663,7 @@ void InterpreterSystemQuery::syncReplica(ASTSystemQuery &)
{
LOG_ERROR(log, "SYNC REPLICA {}: Timed out!", table_id.getNameForLogs());
throw Exception(
"SYNC REPLICA " + table_id.getNameForLogs() + ": command timed out! "
"SYNC REPLICA " + table_id.getNameForLogs() + ": command timed out. "
"See the 'receive_timeout' setting", ErrorCodes::TIMEOUT_EXCEEDED);
}
LOG_TRACE(log, "SYNC REPLICA {}: OK", table_id.getNameForLogs());

View File

@ -117,8 +117,9 @@ timeout $TIMEOUT bash -c drop_part_thread &
wait
for ((i=0; i<16; i++)) do
$CLICKHOUSE_CLIENT -q "SYSTEM SYNC REPLICA dst_$i" &
$CLICKHOUSE_CLIENT -q "SYSTEM SYNC REPLICA src_$i" 2>/dev/null &
# The size of log is big, so increase timeout.
$CLICKHOUSE_CLIENT --receive_timeout 600 -q "SYSTEM SYNC REPLICA dst_$i" &
$CLICKHOUSE_CLIENT --receive_timeout 600 -q "SYSTEM SYNC REPLICA src_$i" 2>/dev/null &
done
wait
echo "Replication did not hang"