Clear galeramon server info in pre_tick

The server information in galeramon is gathered every monitoring
interval. To prevent stale information from being used, the server
information needs to be cleared at the start of each monitoring interval.
This commit is contained in:
Markus Mäkelä
2018-06-18 00:06:52 +03:00
parent 026313fcc7
commit 9d961ece3a
2 changed files with 7 additions and 0 deletions

View File

@ -237,6 +237,12 @@ void GaleraMonitor::update_server_status(MXS_MONITORED_SERVER* monitored_server)
}
}
void GaleraMonitor::pre_tick()
{
// Clear the info before monitoring to make sure it's up to date
m_info.clear();
}
void GaleraMonitor::post_tick()
{
int is_cluster = 0;

View File

@ -51,6 +51,7 @@ protected:
bool configure(const MXS_CONFIG_PARAMETER* param);
bool has_sufficient_permissions() const;
void update_server_status(MXS_MONITORED_SERVER* monitored_server);
void pre_tick();
void post_tick();
private: