From 2dd8152c8ba4fa63b24ecc90d73aeb3e81d37a9f Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Wed, 8 Nov 2023 18:00:34 +0200 Subject: [PATCH] storage_service: topology coordinator: log rollback event before changing node's state The test for the rollback relies on the log to be there after operation fails, but if node's state is changed before the log the operation may fail before the log is printed. Fixes scylladb/scylladb#15980 Message-ID: --- service/storage_service.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/storage_service.cc b/service/storage_service.cc index c1257a317b..6c764ba90d 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -2467,8 +2467,8 @@ future<> topology_coordinator::rollback_current_topology_op(group0_guard&& guard auto str = fmt::format("rollback {} after {} failure to state {}", node.id, node.rs->state, state); - co_await update_topology_state(std::move(node.guard), {builder.build()}, str); slogger.info("{}", str); + co_await update_topology_state(std::move(node.guard), {builder.build()}, str); // Try to run metadata barrier to wait for all double writes to complete // but ignore failures try {