From 0891a5b56c77e9e697490bd65d45cd6937e33d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sun, 23 Apr 2023 09:56:25 +0000 Subject: [PATCH] Renaming thread_info_t to mon_thread_info_t Apparently thread_info_t is already defined in OSX , so it wasn't able to compile --- lib/MySQL_Monitor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index e6d9e0943..d0d3bf57a 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -3795,7 +3795,7 @@ unique_ptr init_mysql_thread_struct() { return mysql_thr; } -struct thread_info_t { +struct mon_thread_info_t { pthread_t pthread; uint32_t writer_hg; }; @@ -3924,18 +3924,18 @@ void* monitor_GR_thread_HG(void *arg) { /** * @brief Creates a monitoring thread for each 'GroupReplication' cluster determined by writer hostgroups. * @param writer_hgs The writer hostgroups to use when creating the threads. - * @return A vector of 'thread_info_t' holding info of the created threads. + * @return A vector of 'mon_thread_info_t' holding info of the created threads. */ -vector create_group_replication_worker_threads(const set& writer_hgs) { +vector create_group_replication_worker_threads(const set& writer_hgs) { proxy_info("Activating Monitoring of %lu Group Replication clusters\n", writer_hgs.size()); - vector threads_info {}; + vector threads_info {}; for (const uint32_t writer_hg : writer_hgs) { threads_info.push_back({pthread_t {}, writer_hg}); } - for (thread_info_t& thread_info : threads_info) { + for (mon_thread_info_t& thread_info : threads_info) { proxy_info("Starting Monitor thread for Group Replication writer HG %u\n", thread_info.writer_hg); int err = pthread_create(&thread_info.pthread, NULL, monitor_GR_thread_HG, &thread_info.writer_hg); @@ -3963,7 +3963,7 @@ void* MySQL_Monitor::monitor_group_replication_2() { unique_ptr mysql_thr { init_mysql_thread_struct() }; // Info of the current GR monitoring threads: handle + writer_hg - vector threads_info {}; + vector threads_info {}; while (GloMyMon->shutdown == false && mysql_thread___monitor_enabled == true) { // Quick exit during shutdown/restart @@ -3988,7 +3988,7 @@ void* MySQL_Monitor::monitor_group_replication_2() { // Wait for the threads to terminate; Threads should exit on config change if (threads_info.empty() == false) { - for (const thread_info_t& thread_info : threads_info) { + for (const mon_thread_info_t& thread_info : threads_info) { pthread_join(thread_info.pthread, NULL); proxy_info("Stopped Monitor thread for Group Replication writer HG %u\n", thread_info.writer_hg); }