Commit d58975bb authored by Brandon Nesterenko's avatar Brandon Nesterenko

MDEV-9159: Bring back assert in semisync_master.cc

In 10.0 there was an assert to ensure that there were semi
sync clients before removing one, but it was removed in 10.1.
This patch adds the assertion back.
parent 73ad436e
...@@ -571,6 +571,7 @@ void Repl_semi_sync_master::add_slave() ...@@ -571,6 +571,7 @@ void Repl_semi_sync_master::add_slave()
void Repl_semi_sync_master::remove_slave() void Repl_semi_sync_master::remove_slave()
{ {
lock(); lock();
DBUG_ASSERT(rpl_semi_sync_master_clients > 0);
if (!(--rpl_semi_sync_master_clients) && !rpl_semi_sync_master_wait_no_slave) if (!(--rpl_semi_sync_master_clients) && !rpl_semi_sync_master_wait_no_slave)
{ {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment