diff --git a/include/wsrep/buffer.hpp b/include/wsrep/buffer.hpp index 1c1ac599..d36da2bf 100644 --- a/include/wsrep/buffer.hpp +++ b/include/wsrep/buffer.hpp @@ -22,6 +22,7 @@ #include #include +#include namespace wsrep { diff --git a/src/server_state.cpp b/src/server_state.cpp index a7174e00..13aff536 100644 --- a/src/server_state.cpp +++ b/src/server_state.cpp @@ -340,7 +340,14 @@ static int apply_write_set(wsrep::server_state& server_state, { assert(err.size() == 0); ret = high_priority_service.commit(ws_handle, ws_meta); - ret = ret || (high_priority_service.after_apply(), 0); + // Commit may fail if commit order could not be entered, e.g. + // the node left the primary component. Roll back the + // still-active applier transaction; after_apply() cleans up. + if (ret) + { + high_priority_service.rollback(ws_handle, ws_meta); + } + high_priority_service.after_apply(); } else { diff --git a/wsrep-API/v26 b/wsrep-API/v26 index 7fe08ed3..f80a23b6 160000 --- a/wsrep-API/v26 +++ b/wsrep-API/v26 @@ -1 +1 @@ -Subproject commit 7fe08ed333419c353438ed0d1068b9ea72fa5d50 +Subproject commit f80a23b6642c2d7d4d2e32ad4ba9d6fea4bdfeba