From e1f99e8bea2a45241a2dc31dea5e84fe5f8c5d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Mon, 19 Aug 2024 17:48:54 +0200 Subject: [PATCH] Make logging of Galera nodes status conditional to 'mysql-hostgroup_manager_verbose' - Closes #4612 --- lib/MySQL_HostGroups_Manager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/MySQL_HostGroups_Manager.cpp b/lib/MySQL_HostGroups_Manager.cpp index a97c0f03c..c3e048f73 100644 --- a/lib/MySQL_HostGroups_Manager.cpp +++ b/lib/MySQL_HostGroups_Manager.cpp @@ -5062,7 +5062,13 @@ bool Galera_Info::update(int b, int r, int o, int mw, int mtb, bool _a, int _w, return ret; } +/** + * @brief Dumps to stderr the current info for the monitored Galera hosts ('Galera_Hosts_Map'). + * @details No action if `mysql_thread___hostgroup_manager_verbose=0`. + */ void print_galera_nodes_last_status() { + if (!mysql_thread___hostgroup_manager_verbose) return; + std::unique_ptr result { new SQLite3_result(13) }; result->add_column_definition(SQLITE_TEXT,"hostname");