mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-06-14 15:02:27 +03:00
Fixed dbsim BF aborts
This commit is contained in:
@ -30,8 +30,7 @@ void db::client::start()
|
||||
|
||||
bool db::client::bf_abort(wsrep::seqno seqno)
|
||||
{
|
||||
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
|
||||
return client_context_.bf_abort(lock, seqno);
|
||||
return client_context_.bf_abort(seqno);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -53,15 +53,13 @@ void db::storage_engine::bf_abort_some(const wsrep::transaction_context& txc)
|
||||
for (auto victim : transactions_)
|
||||
{
|
||||
wsrep::client_context& cc(victim->client_context());
|
||||
wsrep::unique_lock<wsrep::mutex> lock(cc.mutex());
|
||||
if (cc.mode() == wsrep::client_context::m_replicating)
|
||||
{
|
||||
lock.unlock();
|
||||
if (victim->bf_abort(txc.seqno()))
|
||||
{
|
||||
++bf_aborts_;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -397,9 +397,9 @@ namespace wsrep
|
||||
//
|
||||
// BF aborting
|
||||
//
|
||||
int bf_abort(wsrep::unique_lock<wsrep::mutex>& lock,
|
||||
wsrep::seqno bf_seqno)
|
||||
int bf_abort(wsrep::seqno bf_seqno)
|
||||
{
|
||||
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
|
||||
assert(mode_ == m_replicating);
|
||||
return transaction_.bf_abort(lock, bf_seqno);
|
||||
}
|
||||
|
@ -125,9 +125,8 @@ int wsrep::server_context::on_apply(
|
||||
{
|
||||
int ret(0);
|
||||
const wsrep::transaction_context& txc(client_context.transaction());
|
||||
// wsrep::log_debug() << "server_context::on apply flags: "
|
||||
// << flags_to_string(ws_meta.flags());
|
||||
assert(ws_handle.opaque());
|
||||
assert(client_context.mode() == wsrep::client_context::m_high_priority);
|
||||
|
||||
bool not_replaying(txc.state() !=
|
||||
wsrep::transaction_context::s_replaying);
|
||||
|
||||
|
@ -88,7 +88,6 @@ int wsrep::transaction_context::start_replaying(const wsrep::ws_meta& ws_meta)
|
||||
assert(active());
|
||||
assert(client_context_.mode() == wsrep::client_context::m_high_priority);
|
||||
assert(state() == s_replaying);
|
||||
assert(ws_handle_.opaque());
|
||||
assert(ws_meta_.seqno().nil() == false);
|
||||
certified_ = true;
|
||||
return 0;
|
||||
|
@ -10,16 +10,14 @@
|
||||
// Simple BF abort method to BF abort unordered transasctions
|
||||
void wsrep_test::bf_abort_unordered(wsrep::client_context& cc)
|
||||
{
|
||||
wsrep::unique_lock<wsrep::mutex> lock(cc.mutex());
|
||||
assert(cc.transaction().ordered() == false);
|
||||
cc.bf_abort(lock, wsrep::seqno(1));
|
||||
cc.bf_abort(wsrep::seqno(1));
|
||||
}
|
||||
|
||||
void wsrep_test::bf_abort_ordered(wsrep::client_context& cc)
|
||||
{
|
||||
wsrep::unique_lock<wsrep::mutex> lock(cc.mutex());
|
||||
assert(cc.transaction().ordered());
|
||||
cc.bf_abort(lock, wsrep::seqno(0));
|
||||
cc.bf_abort(wsrep::seqno(0));
|
||||
}
|
||||
// BF abort method to abort transactions via provider
|
||||
void wsrep_test::bf_abort_provider(wsrep::mock_server_context& sc,
|
||||
|
Reference in New Issue
Block a user