From 84bf241dd16f3b5cb85b785ac7ab89c802c12481 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 26 Mar 2019 16:34:12 +0200 Subject: [PATCH] MXS-2339 A running Clustrix node is regarded as master In this context master should be interpreted as "can be read and written to". Marking them as master requires less changes in RWS to make it usable with a Clustrix cluster. --- server/modules/monitor/clustrixmon/clustrixmonitor.cc | 6 +++--- server/modules/monitor/clustrixmon/clustrixnode.hh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/modules/monitor/clustrixmon/clustrixmonitor.cc b/server/modules/monitor/clustrixmon/clustrixmonitor.cc index 208bced6b..9a2a6e9ad 100644 --- a/server/modules/monitor/clustrixmon/clustrixmonitor.cc +++ b/server/modules/monitor/clustrixmon/clustrixmonitor.cc @@ -581,16 +581,16 @@ void ClustrixMonitor::update_server_statuses() if (info.is_running()) { - ms->set_pending_status(SERVER_RUNNING); + ms->set_pending_status(SERVER_MASTER | SERVER_RUNNING); } else { - ms->clear_pending_status(SERVER_RUNNING); + ms->clear_pending_status(SERVER_MASTER | SERVER_RUNNING); } } else { - ms->clear_pending_status(SERVER_RUNNING); + ms->clear_pending_status(SERVER_MASTER | SERVER_RUNNING); } } } diff --git a/server/modules/monitor/clustrixmon/clustrixnode.hh b/server/modules/monitor/clustrixmon/clustrixnode.hh index 66017f4fa..74692856f 100644 --- a/server/modules/monitor/clustrixmon/clustrixnode.hh +++ b/server/modules/monitor/clustrixmon/clustrixnode.hh @@ -125,7 +125,7 @@ public: { m_nRunning = m_health_check_threshold; - m_pServer->set_status(SERVER_RUNNING); + m_pServer->set_status(SERVER_MASTER | SERVER_RUNNING); } else { @@ -142,7 +142,7 @@ public: if (m_nRunning == 0) { - m_pServer->clear_status(SERVER_RUNNING); + m_pServer->clear_status(SERVER_MASTER | SERVER_RUNNING); } } }