diff --git a/include/wsrep/server_state.hpp b/include/wsrep/server_state.hpp index f1682d9..c47fd7b 100644 --- a/include/wsrep/server_state.hpp +++ b/include/wsrep/server_state.hpp @@ -8,7 +8,7 @@ * ========================== * * This file defines an interface for WSREP Server State. - * The Server State t will encapsulate server identification, + * The Server State will encapsulate server identification, * server state and server capabilities. The class also * defines an interface for manipulating server state, applying * of remote transaction write sets, processing SST requests, diff --git a/src/server_state.cpp b/src/server_state.cpp index f14a3ac..427dee2 100644 --- a/src/server_state.cpp +++ b/src/server_state.cpp @@ -33,8 +33,7 @@ static bool is_bootstrap(const std::string& cluster_address, bool bootstrap) return (bootstrap || cluster_address == "gcomm://"); } -static int apply_fragment(wsrep::server_state& server_state, - wsrep::high_priority_service& high_priority_service, +static int apply_fragment(wsrep::high_priority_service& high_priority_service, wsrep::high_priority_service& streaming_applier, const wsrep::ws_handle& ws_handle, const wsrep::ws_meta& ws_meta, @@ -97,8 +96,7 @@ static int rollback_fragment(wsrep::server_state& server_state, wsrep::high_priority_service& high_priority_service, wsrep::high_priority_service* streaming_applier, const wsrep::ws_handle& ws_handle, - const wsrep::ws_meta& ws_meta, - const wsrep::const_buffer& data) + const wsrep::ws_meta& ws_meta) { int ret= 0; // Adopts transaction state and starts a transaction for @@ -166,8 +164,7 @@ static int apply_write_set(wsrep::server_state& server_state, high_priority_service, sa, ws_handle, - ws_meta, - data); + ws_meta); } } } @@ -193,8 +190,7 @@ static int apply_write_set(wsrep::server_state& server_state, server_state.start_streaming_applier( ws_meta.server_id(), ws_meta.transaction_id(), sa); sa->start_transaction(ws_handle, ws_meta); - ret = apply_fragment(server_state, - high_priority_service, + ret = apply_fragment(high_priority_service, *sa, ws_handle, ws_meta, @@ -220,8 +216,7 @@ static int apply_write_set(wsrep::server_state& server_state, } else { - ret = apply_fragment(server_state, - high_priority_service, + ret = apply_fragment(high_priority_service, *sa, ws_handle, ws_meta, diff --git a/test/mock_client_state.cpp b/test/mock_client_state.cpp index a3a61f2..b14e9da 100644 --- a/test/mock_client_state.cpp +++ b/test/mock_client_state.cpp @@ -21,7 +21,7 @@ int wsrep::mock_client_service::bf_rollback() } enum wsrep::provider::status -wsrep::mock_client_service::replay() WSREP_OVERRIDE +wsrep::mock_client_service::replay() { wsrep::mock_high_priority_service hps(client_state_.server_state(), &client_state_, true); diff --git a/test/mock_client_state.hpp b/test/mock_client_state.hpp index 29eb009..4bb53b4 100644 --- a/test/mock_client_state.hpp +++ b/test/mock_client_state.hpp @@ -20,7 +20,8 @@ namespace wsrep wsrep::client_service& client_service, const wsrep::client_id& id, enum wsrep::client_state::mode mode) - : wsrep::client_state(mutex_, cond_, server_state, client_service, id, mode) + : wsrep::client_state(mutex_, cond_, server_state, client_service, + id, mode) , mutex_() , cond_() { } @@ -59,9 +60,9 @@ namespace wsrep , aborts_() { } - int apply_write_set(const wsrep::const_buffer&) WSREP_OVERRIDE; + int apply_write_set(const wsrep::const_buffer&); - int apply_toi(const wsrep::const_buffer&) WSREP_OVERRIDE; + int apply_toi(const wsrep::const_buffer&); int bf_rollback() WSREP_OVERRIDE; @@ -76,7 +77,7 @@ namespace wsrep int append_fragment(const wsrep::transaction&, int, - const wsrep::const_buffer&) WSREP_OVERRIDE + const wsrep::const_buffer&) { return 0; } int remove_fragments() WSREP_OVERRIDE { return 0; } void will_replay() WSREP_OVERRIDE { } diff --git a/test/mock_high_priority_service.cpp b/test/mock_high_priority_service.cpp index 3232582..17c432c 100644 --- a/test/mock_high_priority_service.cpp +++ b/test/mock_high_priority_service.cpp @@ -8,7 +8,7 @@ int wsrep::mock_high_priority_service::apply( const wsrep::ws_handle& ws_handle, const wsrep::ws_meta& ws_meta, - const wsrep::const_buffer& data) WSREP_OVERRIDE + const wsrep::const_buffer& data) { return server_state_.on_apply(*this, ws_handle, ws_meta, data); } diff --git a/test/mock_high_priority_service.hpp b/test/mock_high_priority_service.hpp index 19d090a..ef4ac89 100644 --- a/test/mock_high_priority_service.hpp +++ b/test/mock_high_priority_service.hpp @@ -26,7 +26,7 @@ namespace wsrep int apply(const wsrep::ws_handle&, const wsrep::ws_meta&, - const wsrep::const_buffer&) WSREP_OVERRIDE; + const wsrep::const_buffer&); int start_transaction(const wsrep::ws_handle&, const wsrep::ws_meta&) WSREP_OVERRIDE; diff --git a/test/mock_server_state.hpp b/test/mock_server_state.hpp index 7be99bc..c86fa6e 100644 --- a/test/mock_server_state.hpp +++ b/test/mock_server_state.hpp @@ -104,7 +104,7 @@ namespace wsrep WSREP_OVERRIDE { mock_high_priority_service* mhps( - dynamic_cast(high_priority_service)); + reinterpret_cast(high_priority_service)); wsrep::client_state* cs(mhps->client_state()); cs->after_command_before_result(); cs->after_command_after_result();