From cb93aaa77b6d26a0ba0eef385c19a21e166322f8 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 30 Nov 2018 15:55:36 +0100 Subject: [PATCH] Lost e_error_during_commit if fragment size exceeds maximum size If the size of a SR fragment exceeds the maximum size that the replication provider allows us to replicate, then we are expected to set the client error code to e_error_during_commit. However, client_state::after_statement() unconditionally overrides it to error e_deadlock_error. Fixes client_state::after_statement() so that it overrided the error only if noerror has been set yet. --- src/client_state.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client_state.cpp b/src/client_state.cpp index 9bb9249..f3ce728 100644 --- a/src/client_state.cpp +++ b/src/client_state.cpp @@ -224,7 +224,13 @@ int wsrep::client_state::after_statement() client_service_.bf_rollback(); lock.lock(); assert(transaction_.state() == wsrep::transaction::s_aborted); - override_error(wsrep::e_deadlock_error); + // Error may be set already. For example, if fragment size + // exceeded the maximum size in certify_fragment(), then + // we already have wsrep::e_error_during_commit + if (current_error() == wsrep::e_success) + { + override_error(wsrep::e_deadlock_error); + } } lock.unlock();