Skip to content

Commit

Permalink
[8/n] Reconfigure logs if default log replication has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedSoliman committed Jan 27, 2025
1 parent 0945fd1 commit 435be46
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit 435be46

Please sign in to comment.