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

Implemented SR transaction rollbacking during configuration changes.

SR tranasctions are BF aborted or rolled back on primary view
changes according to the following rules:
* Ongoing local SR transactions are BF aborted if the processing
  server is not found from the current view.
* All remote SR transactions whose origin server is not included in the
  current view are rolled back.
This commit is contained in:
Teemu Ollakka
2018-07-14 16:11:13 +03:00
parent 13487781d8
commit 86472ee420
6 changed files with 265 additions and 44 deletions

View File

@ -306,7 +306,7 @@ namespace
}
wsrep_cb_status_t view_cb(void* app_ctx,
void* recv_ctx __attribute__((unused)),
void* recv_ctx,
const wsrep_view_info_t* view_info,
const char*,
size_t)
@ -315,10 +315,12 @@ namespace
assert(view_info);
wsrep::server_state& server_state(
*reinterpret_cast<wsrep::server_state*>(app_ctx));
wsrep::high_priority_service* high_priority_service(
reinterpret_cast<wsrep::high_priority_service*>(recv_ctx));
try
{
wsrep::view view(view_from_native(*view_info));
server_state.on_view(view);
server_state.on_view(view, high_priority_service);
return WSREP_CB_SUCCESS;
}
catch (const wsrep::runtime_error& e)