Detect manual commands faster

Previous, MariaDBMonitor would wait until the next monitor interval before detecting
a new manual command. The commands are now checked every 100 ms.
This commit is contained in:
Esa Korhonen
2018-11-07 16:56:52 +02:00
parent 8058e46309
commit ecc7442358
4 changed files with 27 additions and 8 deletions

View File

@ -757,6 +757,11 @@ bool MariaDBMonitor::execute_manual_command(std::function<void(void)> command, j
return rval;
}
bool MariaDBMonitor::immediate_tick_required() const
{
return m_manual_cmd.command_waiting_exec;
}
bool MariaDBMonitor::run_manual_switchover(SERVER* promotion_server, SERVER* demotion_server,
json_t** error_out)
{