MXS-2271 Monitor modifications always go through Monitor::configure()

Previously, runtime monitor modifications could directly alter monitor fields,
which could leave the text-form parameters and reality out-of-sync. Also,
the configure-function was not called for the entire monitor-object, only the
module-implementation.

Now, all modifications go through the overridden configure-function, which calls the
base-class function. As most configuration changes are given in text-form, this
removes the need for specific setters. The only exceptions are the server add/remove
operations, which must modify the text-form serverlist.
This commit is contained in:
Esa Korhonen
2019-01-29 15:34:05 +02:00
parent 703f65700a
commit 1858fe9127
13 changed files with 192 additions and 164 deletions

View File

@ -55,6 +55,11 @@ ClustrixMonitor* ClustrixMonitor::create(const string& name, const string& modul
bool ClustrixMonitor::configure(const MXS_CONFIG_PARAMETER* pParams)
{
if (!MonitorWorker::configure(pParams))
{
return false;
}
m_health_urls.clear();
m_nodes.clear();