From cb4e6075344b50cc3606e4d7946a4ad985404c4c Mon Sep 17 00:00:00 2001 From: Michal Maslanka Date: Mon, 20 Nov 2023 16:16:03 +0100 Subject: [PATCH] r/consensus: log configuration replace event Signed-off-by: Michal Maslanka --- src/v/raft/consensus.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/v/raft/consensus.cc b/src/v/raft/consensus.cc index f0696625bfe81..2f056cd038aa1 100644 --- a/src/v/raft/consensus.cc +++ b/src/v/raft/consensus.cc @@ -1158,10 +1158,16 @@ ss::future consensus::replace_configuration( model::revision_id new_revision, std::optional 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{std::move(current)}; });