MXS-3149 Properly remove master-status from server during demotion
Removing it from the pending status field has not effect as the pending changes have all ready been written to real status.
This commit is contained in:
parent
c6c664b365
commit
9304230212
@ -514,8 +514,6 @@ void MariaDBMonitor::tick()
|
||||
}
|
||||
|
||||
log_master_changes();
|
||||
|
||||
flush_server_status();
|
||||
process_state_changes();
|
||||
hangup_failed_servers();
|
||||
store_server_journal(m_master ? m_master->m_server_base : nullptr);
|
||||
|
@ -1596,7 +1596,8 @@ bool MariaDBServer::demote(GeneralOpData& general, ServerOperation& demotion, Op
|
||||
// Step 2a: Remove [Master] from this server. This prevents compatible routers (RWS)
|
||||
// from routing writes to this server. Writes in flight will go through, at least until
|
||||
// read_only is set.
|
||||
clear_status(SERVER_MASTER);
|
||||
m_server_base->server->clear_status(SERVER_MASTER);
|
||||
|
||||
// Step 2b: If other users with SUPER privileges are on, kick them out now since
|
||||
// read_only doesn't stop them from doing writes. This does not stop them from immediately
|
||||
// logging back in but it's better than nothing. This also stops super-user writes going
|
||||
|
Loading…
x
Reference in New Issue
Block a user