test/cluster: wait for ready CQL in cross-rack merge test
test_tablet_merge_cross_rack_migrations() starts issuing DDL immediately after adding the new cross-rack nodes. In the failing runs the driver is still converging on the updated topology at that point, so the control connection sees incomplete peer metadata while schema changes are in flight. That leaves a race where CREATE TABLE is sent during topology churn and the test can surface a misleading AlreadyExists error even though the table creation has already been committed. Use get_ready_cql(servers) here so the test waits for inter-node visibility and CQL readiness before creating the keyspace and table. Fixes: SCYLLADB-1635 Closes scylladb/scylladb#29561
This commit is contained in:
committed by
Tomasz Grabiec
parent
d18eb9479f
commit
a50aa7e689
@@ -334,7 +334,7 @@ async def test_tablet_merge_cross_rack_migrations(manager: ManagerClient, racks)
|
||||
rack = f'rack{rack_id+1}'
|
||||
servers.extend(await manager.servers_add(3, config=config, cmdline=cmdline, property_file={'dc': 'mydc', 'rack': rack}))
|
||||
|
||||
cql = manager.get_cql()
|
||||
cql, _ = await manager.get_ready_cql(servers)
|
||||
ks = await create_new_test_keyspace(cql, f"WITH replication = {{'class': 'NetworkTopologyStrategy', 'replication_factor': {rf}}} AND tablets = {{'initial': 1}}")
|
||||
await cql.run_async(f"CREATE TABLE {ks}.test (pk int PRIMARY KEY, c blob) WITH compression = {{'sstable_compression': ''}};")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user