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

[8/n] Reconfigure logs if default replicatation has changed #2542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions crates/admin/src/cluster_controller/logs_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,18 @@ impl LogletConfiguration {
return false;
};

if params.replication != config.replication_property {
// replication property has changed, we need to reconfigure.
debug!(
%log_id,
loglet_id = ?params.loglet_id,
current_replication = %params.replication,
new_replication = %config.replication_property,
"Replicated loglet default replication has can changed, will attempt reconfiguration"
);
return true;
}

// todo 1: This is an over-simplifying check, ideally we'd want to see if the new nodeset
// improves our safety-margin (fault-tolerance) or not by running nodeset checker with higher
// replication on every scope, or any other reasonable metric that let us decide
Expand Down
Loading