From ae25f703c45972e0b96876f12e22c91bf099aa2a Mon Sep 17 00:00:00 2001 From: Kamil Braun Date: Thu, 11 Jan 2024 15:38:12 +0100 Subject: [PATCH] raft topology: INFO log when executing global commands and updating topology state Those are rare control plane events, but useful for debugging e.g. if topology coordinator gets stuck at some point. --- service/storage_service.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/storage_service.cc b/service/storage_service.cc index aaa6256cc0..e5303c5c6a 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -1455,7 +1455,8 @@ class topology_coordinator : public endpoint_lifecycle_subscriber { future<> update_topology_state( group0_guard guard, std::vector&& updates, const sstring& reason) { try { - rtlogger.trace("do update {} reason {}", updates, reason); + rtlogger.info("updating topology state: {}", reason); + rtlogger.trace("update_topology_state mutations: {}", updates); topology_change change{std::move(updates)}; group0_command g0_cmd = _group0.client().prepare_command(std::move(change), guard, reason); co_await _group0.client().add_entry(std::move(g0_cmd), std::move(guard), &_as); @@ -1544,6 +1545,7 @@ class topology_coordinator : public endpoint_lifecycle_subscriber { group0_guard guard, const raft_topology_cmd& cmd, const std::unordered_set& exclude_nodes, drop_guard_and_retake drop_and_retake = drop_guard_and_retake::yes) { + rtlogger.info("executing global topology command {}, excluded nodes: {}", cmd.cmd, exclude_nodes); auto nodes = _topo_sm._topology.normal_nodes | boost::adaptors::filtered([&exclude_nodes] (const std::pair& n) { return !exclude_nodes.contains(n.first);