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

Fixes to review comments

- Increased loop sleep in poll_enter_toi()
- Fixed typos in comments
- Got rid of unnecessary ostringstreams
This commit is contained in:
Teemu Ollakka
2019-09-19 14:08:27 +03:00
parent 3fd20c4e4d
commit 7d8583983f
2 changed files with 12 additions and 11 deletions

View File

@ -371,7 +371,7 @@ wsrep::client_state::poll_enter_toi(
if (status == wsrep::provider::error_certification_failed ||
status == wsrep::provider::error_connection_failed)
{
::usleep(100000);
::usleep(300000);
}
lock.lock();
timed_out = !(wait_until.time_since_epoch().count() &&
@ -811,10 +811,8 @@ void wsrep::client_state::state(
};
if (!allowed[state_][state])
{
std::ostringstream os;
os << "client_state: Unallowed state transition: "
<< state_ << " -> " << state;
wsrep::log_warning() << os.str();
wsrep::log_warning() << "client_state: Unallowed state transition: "
<< state_ << " -> " << state;
assert(0);
}
state_hist_.push_back(state_);
@ -843,10 +841,8 @@ void wsrep::client_state::mode(
};
if (!allowed[mode_][mode])
{
std::ostringstream os;
os << "client_state: Unallowed mode transition: "
<< mode_ << " -> " << mode;
wsrep::log_warning() << os.str();
wsrep::log_warning() << "client_state: Unallowed mode transition: "
<< mode_ << " -> " << mode;
assert(0);
}
mode_ = mode;