Merge pull request #11548 from ClickHouse/fix_01079_detach

Better 01079_parallel_alter tests
This commit is contained in:
alesapin 2020-06-09 17:11:45 +03:00 committed by GitHub
commit e4b5515f3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -97,7 +97,7 @@ done
echo "Equal number of columns" echo "Equal number of columns"
# This alter will finish all previous, but replica 1 maybe still not up-to-date # This alter will finish all previous, but replica 1 maybe still not up-to-date
while [[ $(timeout 30 $CLICKHOUSE_CLIENT --query "ALTER TABLE concurrent_alter_add_drop_1 MODIFY COLUMN value0 String SETTINGS replication_alter_partitions_sync=2" 2>&1) ]]; do while [[ $(timeout 120 $CLICKHOUSE_CLIENT --query "ALTER TABLE concurrent_alter_add_drop_1 MODIFY COLUMN value0 String SETTINGS replication_alter_partitions_sync=2" 2>&1) ]]; do
sleep 1 sleep 1
done done

View File

@ -96,8 +96,12 @@ done
# This alter will finish all previous, but replica 1 maybe still not up-to-date # This alter will finish all previous, but replica 1 maybe still not up-to-date
while [[ $(timeout 30 $CLICKHOUSE_CLIENT --query "ALTER TABLE concurrent_alter_detach_1 MODIFY COLUMN value1 String SETTINGS replication_alter_partitions_sync=2" 2>&1) ]]; do while [[ $(timeout 120 $CLICKHOUSE_CLIENT --query "ALTER TABLE concurrent_alter_detach_1 MODIFY COLUMN value1 String SETTINGS replication_alter_partitions_sync=2" 2>&1) ]]; do
sleep 1 sleep 1
# just try to attach table if it failed for some reason in the code above
for i in `seq $REPLICAS`; do
$CLICKHOUSE_CLIENT --query "ATTACH TABLE concurrent_alter_detach_$i" 2> /dev/null
done
done done
for i in `seq $REPLICAS`; do for i in `seq $REPLICAS`; do