mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Refactored most of the server_state interface into server_service
abstract interface.
This commit is contained in:
@ -273,6 +273,7 @@ int wsrep::server_state::on_apply(
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 0
|
||||
bool wsrep::server_state::statement_allowed_for_streaming(
|
||||
const wsrep::client_state&,
|
||||
const wsrep::transaction&) const
|
||||
@ -280,6 +281,7 @@ bool wsrep::server_state::statement_allowed_for_streaming(
|
||||
/* Streaming not implemented yet. */
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void wsrep::server_state::start_streaming_applier(
|
||||
const wsrep::id& server_id,
|
||||
|
@ -163,8 +163,7 @@ int wsrep::transaction::before_prepare(
|
||||
client_state_.debug_crash(
|
||||
"crash_last_fragment_commit_before_fragment_removal");
|
||||
lock.unlock();
|
||||
if (client_state_.server_state().statement_allowed_for_streaming(
|
||||
client_state_, *this))
|
||||
if (client_state_.statement_allowed_for_streaming() == false)
|
||||
{
|
||||
client_state_.override_error(wsrep::e_error_during_commit);
|
||||
ret = 1;
|
||||
|
@ -289,7 +289,7 @@ namespace
|
||||
|
||||
try
|
||||
{
|
||||
std::string req(server_state.on_sst_required());
|
||||
std::string req(server_state.sst_request());
|
||||
*sst_req = ::strdup(req.c_str());
|
||||
*sst_req_len = strlen(req.c_str());
|
||||
return WSREP_CB_SUCCESS;
|
||||
@ -369,7 +369,10 @@ namespace
|
||||
wsrep::gtid gtid(wsrep::id(req_gtid->uuid.data,
|
||||
sizeof(req_gtid->uuid.data)),
|
||||
wsrep::seqno(req_gtid->seqno));
|
||||
server_state.on_sst_request(req, gtid, bypass);
|
||||
if (server_state.start_sst(req, gtid, bypass))
|
||||
{
|
||||
return WSREP_CB_FAILURE;
|
||||
}
|
||||
return WSREP_CB_SUCCESS;
|
||||
}
|
||||
catch (const wsrep::runtime_error& e)
|
||||
|
Reference in New Issue
Block a user