mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-31 18:24:25 +03:00
Fix crash close_orphaned_sr_transactions()
BF abort
Some implementations of provider `bf_abort()` require `victim_ctx` to point to application side victim context. However, when total order BF abort was done from `close_orphaned_sr_transactions()`, the application side context was not available. To fix this, added an interface method `call_in_operation_context()` which allows invoking a function object with a reference to application side operation context passed in as a parameter. This method is used in `close_orphaned_sr_transactions()` to call `client_state::total_order_bf_abort()` with appropriate victim operation context.
This commit is contained in:
@ -186,6 +186,14 @@ namespace wsrep
|
||||
return false;
|
||||
}
|
||||
|
||||
void call_in_operation_context(
|
||||
const std::function<void(wsrep::operation_context&)>& fn) const
|
||||
WSREP_OVERRIDE
|
||||
{
|
||||
wsrep::null_operation_context op;
|
||||
fn(op);
|
||||
}
|
||||
|
||||
void debug_sync(const char* sync_point) WSREP_OVERRIDE
|
||||
{
|
||||
if (sync_point_enabled_ == sync_point)
|
||||
|
Reference in New Issue
Block a user