test: test_topology_ops: reenable background writes without tablets

After fixing scylladb/scylladb#15924 in one of the previous
patches, we reenable background writes in `test_topology_ops`.

We also start background writes a bit later after adding all nodes.
Without this change and with tablets, the test fails with:
```
>       await cql.run_async(f"CREATE TABLE tbl (pk int PRIMARY KEY, v int)")
E       cassandra.protocol.ConfigurationException: <Error from server: code=2300
        [Query invalid because of configuration issue] message="Datacenter
        datacenter1 doesn't have enough nodes for replication_factor=3">
```

The change above makes the test a bit weaker, but we don't have to
worry about it. If adding nodes is bugged, other tests should
detect it.

Unfortunately, the test still doesn't pass with tablets and
background writes because of scylladb/scylladb#17025, so we keep
background writes disabled with tablets and leave FIXME.

Fixes scylladb/scylladb#15962
This commit is contained in:
Patryk Jędrzejczak
2024-02-28 17:56:12 +01:00
parent 90317c5ceb
commit e7d4e080e9

View File

@@ -35,15 +35,15 @@ async def test_topology_ops(request, manager: ManagerClient, tablets_enabled: bo
await manager.server_stop_gracefully(servers[0].server_id)
await manager.server_start(servers[0].server_id)
await wait_for_cql_and_get_hosts(manager.cql, await manager.running_servers(), time.time() + 60)
cql = await reconnect_driver(manager)
# FIXME: disabled as a workaround for #15935, #15924
# We need to re-enable once these issues are fixed.
#finish_writes = await start_writes(cql)
logger.info("Bootstrapping other nodes")
servers += await manager.servers_add(3, config=cfg)
await wait_for_cql_and_get_hosts(manager.cql, servers, time.time() + 60)
cql = await reconnect_driver(manager)
# FIXME: we disable background writes with tablets enabled because the test fails due to #17025.
# We need to re-enable them once this issue is fixed (by removing `if` here and above `await finish_writes()`).
finish_writes = await start_writes(cql) if not tablets_enabled else None
logger.info(f"Decommissioning node {servers[0]}")
await manager.decommission_node(servers[0].server_id)
await check_token_ring_and_group0_consistency(manager)
@@ -72,7 +72,8 @@ async def test_topology_ops(request, manager: ManagerClient, tablets_enabled: bo
servers = servers[1:]
logger.info("Checking results of the background writes")
#await finish_writes()
if not tablets_enabled:
await finish_writes()
for server in servers:
await check_node_log_for_failed_mutations(manager, server)