Skip to content

Commit 91900e3

Browse files
committed
fix(manager): conditionally restart Scylla after schema restore
Restart Scylla only after schema restoration for versions 2024.1 or lower. For the newest versions of Scylla it's not required. Docs: https://manager.docs.scylladb.com/stable/restore/restore-schema.html https://manager.docs.scylladb.com/stable/restore/old-restore-schema.html
1 parent 9c537ae commit 91900e3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sdcm/mgmt/operations.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from sdcm.utils.gce_utils import get_gce_storage_client
2525
from sdcm.utils.loader_utils import LoaderUtilsMixin
2626
from sdcm.utils.time_utils import ExecutionTimer
27+
from sdcm.utils.version_utils import ComparableScyllaVersion
2728

2829

2930
class ClusterOperations(ClusterTester):
@@ -767,8 +768,11 @@ def restore_backup_with_task(self, mgr_cluster, snapshot_tag, timeout, restore_s
767768
assert restore_task.status == TaskStatus.DONE, f"Restoration of {snapshot_tag} has failed!"
768769
InfoEvent(message=f'The restore task has ended successfully. '
769770
f'Restore run time: {restore_task.duration}.').publish()
770-
if restore_schema:
771-
self.db_cluster.restart_scylla() # After schema restoration, you should restart the nodes
771+
772+
is_restart = restore_schema and ComparableScyllaVersion(self.db_cluster.nodes[0].scylla_version) <= "2024.1"
773+
if is_restart:
774+
self.db_cluster.restart_scylla()
775+
772776
return restore_task
773777

774778
def create_repair_and_alter_it_with_repair_control(self):

0 commit comments

Comments
 (0)