Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2024.2] fix(_get_keyspaces_to_decrease_rf): Address a case where no keyspace RF value of DC #8703

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions sdcm/utils/replication_strategy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,12 @@ def _get_keyspaces_to_decrease_rf(self, session) -> list:
continue # Skip keyspace using SimpleStrategy

if 'NetworkTopologyStrategy' in replication['class']:
rf = int(replication.get(self.datacenter))
if rf == self.original_nodes_number:
rf = replication.get(self.datacenter)
if rf is None:
LOGGER.warning(
f"Datacenter {self.datacenter} not found in replication strategy for keyspace {keyspace_name}.")
continue
if int(rf) == self.original_nodes_number:
matching_keyspaces.append(keyspace_name)
else:
LOGGER.warning("Unexpected replication strategy found: %s", replication['class'])
Expand Down
Loading