Skip to content

Commit

Permalink
r/consensus: log configuration replace event
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Maslanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Nov 20, 2023
1 parent 438e31e commit cb4e607
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/v/raft/consensus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1158,10 +1158,16 @@ ss::future<std::error_code> consensus::replace_configuration(
model::revision_id new_revision,
std::optional<model::offset> learner_start_offset) {
return change_configuration(
[nodes = std::move(nodes), new_revision, learner_start_offset](
[this, nodes = std::move(nodes), new_revision, learner_start_offset](
group_configuration current) mutable {
auto old = current;
current.set_version(raft::group_configuration::v_5);
current.replace(nodes, new_revision, learner_start_offset);
vlog(
_ctxlog.debug,
"Replacing current configuration: {} with new configuration: {}",
old,
current);

return result<group_configuration>{std::move(current)};
});
Expand Down

0 comments on commit cb4e607

Please sign in to comment.