1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-31 18:24:25 +03:00

Fixes to SR transaction processing

* Release server lock temporarily when BF aborting local SR
  transaction during view event processing
* Check transaction state for BF aborts in before_prepare() after
  the lock has acquired after fragment removal
* Send rollback fragment only from streaming_rollback()
This commit is contained in:
Teemu Ollakka
2018-07-17 15:23:53 +03:00
parent b02200b1ef
commit ca5c24655f
3 changed files with 46 additions and 29 deletions

View File

@ -990,7 +990,18 @@ void wsrep::server_state::close_foreign_sr_transactions(
streaming_clients_map::iterator i(streaming_clients_.begin());
wsrep::client_id client_id(i->first);
wsrep::transaction_id transaction_id(i->second->transaction().id());
// It is safe to unlock the server state temporarily here.
// The processing happens inside view handler which is
// protected by the provider commit ordering critical
// section. The lock must be unlocked temporarily to
// allow converting the current client to streaming
// applier in transaction::streaming_rollback().
// The iterator i may be invalidated when the server state
// remains unlocked, so it should not be accessed after
// the bf abort call.
lock.unlock();
i->second->total_order_bf_abort(current_view_.view_seqno());
lock.lock();
streaming_clients_map::const_iterator found_i;
while ((found_i = streaming_clients_.find(client_id)) !=
streaming_clients_.end() &&