mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Fixed timeout condition in poll_enter_toi()
This commit is contained in:
@ -339,6 +339,12 @@ wsrep::client_state::poll_enter_toi(
|
|||||||
int flags,
|
int flags,
|
||||||
std::chrono::time_point<wsrep::clock> wait_until)
|
std::chrono::time_point<wsrep::clock> wait_until)
|
||||||
{
|
{
|
||||||
|
WSREP_LOG_DEBUG(debug_log_level(),
|
||||||
|
wsrep::log::debug_level_client_state,
|
||||||
|
"poll_enter_toi: "
|
||||||
|
<< flags
|
||||||
|
<< ","
|
||||||
|
<< wait_until.time_since_epoch().count());
|
||||||
enum wsrep::provider::status status;
|
enum wsrep::provider::status status;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -366,8 +372,9 @@ wsrep::client_state::poll_enter_toi(
|
|||||||
}
|
}
|
||||||
while (status == wsrep::provider::error_certification_failed &&
|
while (status == wsrep::provider::error_certification_failed &&
|
||||||
wait_until.time_since_epoch().count() &&
|
wait_until.time_since_epoch().count() &&
|
||||||
wait_until < wsrep::clock::now() &&
|
wsrep::clock::now() < wait_until &&
|
||||||
not client_service_.interrupted(lock));
|
not client_service_.interrupted(lock));
|
||||||
|
/** @todo should report timeout error if wait times out */
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,7 +412,7 @@ int wsrep::client_state::enter_toi_local(const wsrep::key_array& keys,
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
override_error(wsrep::e_error_during_commit,
|
override_error(wsrep::e_error_during_commit,
|
||||||
wsrep::provider::error_certification_failed);
|
status);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -723,6 +730,7 @@ void wsrep::client_state::debug_log_state(const char* context) const
|
|||||||
<< "," << to_c_string(state_)
|
<< "," << to_c_string(state_)
|
||||||
<< "," << to_c_string(mode_)
|
<< "," << to_c_string(mode_)
|
||||||
<< "," << wsrep::to_string(current_error_)
|
<< "," << wsrep::to_string(current_error_)
|
||||||
|
<< "," << current_error_status_
|
||||||
<< ",toi: " << toi_meta_.seqno()
|
<< ",toi: " << toi_meta_.seqno()
|
||||||
<< ",nbo: " << nbo_meta_.seqno() << ")");
|
<< ",nbo: " << nbo_meta_.seqno() << ")");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user