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

Fixed compilation on Ubuntu 18.04 / GCC 7.3.0

This commit is contained in:
Alexey Yurchenko
2018-10-02 21:38:28 +03:00
parent 0d2a265edc
commit 31f244c3b3
7 changed files with 15 additions and 19 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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);

View File

@ -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 { }

View File

@ -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);
}

View File

@ -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;

View File

@ -104,7 +104,7 @@ namespace wsrep
WSREP_OVERRIDE
{
mock_high_priority_service* mhps(
dynamic_cast<mock_high_priority_service*>(high_priority_service));
reinterpret_cast<mock_high_priority_service*>(high_priority_service));
wsrep::client_state* cs(mhps->client_state());
cs->after_command_before_result();
cs->after_command_after_result();