From 6b879d46c879a4de8f6429f4b023220009e8f6e0 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 25 Apr 2024 15:37:47 +0200 Subject: [PATCH] Improve "Unallowed state transition" warning In client_state, change warning "Unallowed state transition" to print state names instead of numbers. --- src/client_state.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client_state.cpp b/src/client_state.cpp index 48501fd..c6708f1 100644 --- a/src/client_state.cpp +++ b/src/client_state.cpp @@ -1038,8 +1038,9 @@ void wsrep::client_state::state( }; if (!allowed[state_][state]) { - wsrep::log_warning() << "client_state: Unallowed state transition: " - << state_ << " -> " << state; + wsrep::log_warning() + << "client_state: Unallowed state transition: " + << wsrep::to_string(state_) << " -> " << wsrep::to_string(state); assert(0); } state_hist_.push_back(state_);