1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Wait until rollbacker finishes before closing local client

This commit is contained in:
Teemu Ollakka
2021-09-08 12:28:19 +03:00
parent 22921e7082
commit 7a28f49506

View File

@ -49,6 +49,12 @@ void wsrep::client_state::close()
{ {
wsrep::unique_lock<wsrep::mutex> lock(mutex_); wsrep::unique_lock<wsrep::mutex> lock(mutex_);
debug_log_state("close: enter"); debug_log_state("close: enter");
while (mode_ == m_local && is_rollbacker_active()) {
cond_.wait(lock);
}
do_acquire_ownership(lock);
state(lock, s_quitting); state(lock, s_quitting);
keep_command_error_ = false; keep_command_error_ = false;
lock.unlock(); lock.unlock();