From 594e34052dee9b79d08c56fd230215b64baf4100 Mon Sep 17 00:00:00 2001 From: Leandro Pacheco Date: Fri, 30 Aug 2019 09:43:45 -0300 Subject: [PATCH] handle nbo apply eror also, remove outdated comment --- src/server_state.cpp | 6 +++--- test/nbo_test.cpp | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/server_state.cpp b/src/server_state.cpp index ecec565..3d9a629 100644 --- a/src/server_state.cpp +++ b/src/server_state.cpp @@ -465,9 +465,9 @@ static int apply_toi(wsrep::provider& provider, { provider.commit_order_enter(ws_handle, ws_meta); wsrep::mutable_buffer err; - int ret(high_priority_service.apply_nbo_begin(ws_meta, data, err)); - provider.commit_order_leave(ws_handle, ws_meta, err); - return ret; + int const apply_err(high_priority_service.apply_nbo_begin(ws_meta, data, err)); + int const vote_err(provider.commit_order_leave(ws_handle, ws_meta, err)); + return resolve_return_error(err.size() > 0, vote_err, apply_err); } else if (wsrep::commits_transaction(ws_meta.flags())) { diff --git a/test/nbo_test.cpp b/test/nbo_test.cpp index b610cb3..a297cc3 100644 --- a/test/nbo_test.cpp +++ b/test/nbo_test.cpp @@ -116,7 +116,6 @@ BOOST_FIXTURE_TEST_CASE(test_applying_nbo, nbo_begin.size())) == 0); wsrep::mock_client* nbo_cs(hps.nbo_cs()); BOOST_REQUIRE(nbo_cs); - // TODO(leandro): should applying side really be m_local here? BOOST_REQUIRE(nbo_cs->toi_mode() == wsrep::client_state::m_undefined); BOOST_REQUIRE(nbo_cs->mode() == wsrep::client_state::m_nbo);