Merge 'pytest: start after ungraceful stop' from Alecco

If a server is stopped suddenly (i.e. not graceful), schema tables might
be in inconsistent state. Add a test case and enable Scylla
configuration option (force_schema_commit_log) to handle this.

Fixes #12218

Closes #12630

* github.com:scylladb/scylladb:
  pytest: test start after ungraceful stop
  test.py: enable force_schema_commit_log
This commit is contained in:
Kamil Braun
2023-01-26 12:07:12 +01:00
2 changed files with 13 additions and 0 deletions

View File

@@ -102,6 +102,8 @@ def make_scylla_conf(workdir: pathlib.Path, host_addr: str, seed_addrs: List[str
'reader_concurrency_semaphore_serialize_limit_multiplier': 0,
'reader_concurrency_semaphore_kill_limit_multiplier': 0,
'force_schema_commit_log': True,
}
# Seastar options can not be passed through scylla.yaml, use command line

View File

@@ -372,3 +372,14 @@ async def test_remove_node_with_concurrent_ddl(manager, random_tables):
stopped = True
await ddl_task
logger.debug("ddl fiber done, finished")
@pytest.mark.asyncio
async def test_start_after_sudden_stop(manager: ManagerClient, random_tables) -> None:
"""Tests a server can rejoin the cluster after being stopped suddenly"""
servers = await manager.running_servers()
table = await random_tables.add_table(ncolumns=5)
await manager.server_stop(servers[0].server_id)
await table.add_column()
await manager.server_start(servers[0].server_id)
await random_tables.verify_schema()