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:
@ -506,7 +506,7 @@ void exec_shutdown_monitor(DCB* dcb, MAXINFO_TREE* tree)
|
||||
Monitor* monitor = monitor_find(tree->value);
|
||||
if (monitor)
|
||||
{
|
||||
monitor_stop(monitor);
|
||||
MonitorManager::monitor_stop(monitor);
|
||||
maxinfo_send_ok(dcb);
|
||||
}
|
||||
else
|
||||
@ -615,7 +615,7 @@ void exec_restart_monitor(DCB* dcb, MAXINFO_TREE* tree)
|
||||
Monitor* monitor = monitor_find(tree->value);
|
||||
if (monitor)
|
||||
{
|
||||
MonitorManager::monitor_start(monitor, &monitor->parameters);
|
||||
MonitorManager::monitor_start(monitor);
|
||||
maxinfo_send_ok(dcb);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user