Skip to content

Commit 4a6959a

Browse files
committed
move sync code
1 parent 8844241 commit 4a6959a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/queries/0_stateless/03352_concurrent_rename_alter.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,18 @@ $CLICKHOUSE_CLIENT --query "
8080
8181
SELECT sleep(randConstant() / toUInt32(-1)) * 0.1 FORMAT Null;
8282
83-
ALTER TABLE t_rename_alter ADD COLUMN just_for_sync_alters_and_mutations SETTINGS alter_sync = 2;
84-
ALTER TABLE t_rename_alter MODIFY COLUMN just_for_sync_alters_and_mutations = 43 SETTINGS mutations_sync = 2;
85-
8683
OPTIMIZE TABLE t_rename_alter FINAL;
8784
" 2>/dev/null
8885
# Some concurrent alters may fail because of "Metadata on replica is not up to date with common metadata in Zookeeper"
8986
# It is ok, we only check that server doesn't crash in this
9087

9188
wait
9289

90+
$CLICKHOUSE_CLIENT --query "
91+
ALTER TABLE t_rename_alter ADD COLUMN just_for_sync_alters_and_mutations UInt64 SETTINGS alter_sync = 2;
92+
ALTER TABLE t_rename_alter UPDATE just_for_sync_alters_and_mutations = 43 WHERE 1 SETTINGS mutations_sync = 2;
93+
"
94+
9395
$CLICKHOUSE_CLIENT --query "
9496
SELECT count() > 0 FROM t_rename_alter WHERE NOT ignore(*);
9597
DROP TABLE IF EXISTS t_rename_alter SYNC;

0 commit comments

Comments
 (0)