mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-22 23:21:53 +03:00
Pass ws_handle as const reference to provider replay()
This commit is contained in:
@ -38,8 +38,7 @@ enum wsrep::provider::status
|
||||
db::client_service::replay()
|
||||
{
|
||||
wsrep::high_priority_context high_priority_context(client_state_);
|
||||
auto ret(provider_.replay(const_cast<wsrep::ws_handle&>(
|
||||
client_state_.transaction().ws_handle()),
|
||||
auto ret(provider_.replay(client_state_.transaction().ws_handle(),
|
||||
&client_state_));
|
||||
if (ret == wsrep::provider::success)
|
||||
{
|
||||
|
@ -268,7 +268,7 @@ namespace wsrep
|
||||
* @return Zero in case of success, non-zero on failure.
|
||||
*/
|
||||
virtual enum status replay(
|
||||
wsrep::ws_handle& ws_handle, void* applier_ctx) = 0;
|
||||
const wsrep::ws_handle& ws_handle, void* applier_ctx) = 0;
|
||||
|
||||
virtual int sst_sent(const wsrep::gtid&, int) = 0;
|
||||
virtual int sst_received(const wsrep::gtid&, int) = 0;
|
||||
|
@ -600,10 +600,10 @@ int wsrep::wsrep_provider_v26::release(wsrep::ws_handle& ws_handle)
|
||||
}
|
||||
|
||||
enum wsrep::provider::status
|
||||
wsrep::wsrep_provider_v26::replay(wsrep::ws_handle& ws_handle,
|
||||
wsrep::wsrep_provider_v26::replay(const wsrep::ws_handle& ws_handle,
|
||||
void* applier_ctx)
|
||||
{
|
||||
mutable_ws_handle mwsh(ws_handle);
|
||||
const_ws_handle mwsh(ws_handle);
|
||||
return map_return_value(
|
||||
wsrep_->replay_trx(wsrep_, mwsh.native(), applier_ctx));
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ namespace wsrep
|
||||
int commit_order_leave(const wsrep::ws_handle&,
|
||||
const wsrep::ws_meta&);
|
||||
int release(wsrep::ws_handle&);
|
||||
enum wsrep::provider::status replay(wsrep::ws_handle&, void*);
|
||||
enum wsrep::provider::status replay(const wsrep::ws_handle&, void*);
|
||||
int sst_sent(const wsrep::gtid&,int);
|
||||
int sst_received(const wsrep::gtid& gtid, int);
|
||||
|
||||
|
@ -89,8 +89,7 @@ namespace wsrep
|
||||
replay() WSREP_OVERRIDE
|
||||
{
|
||||
enum wsrep::provider::status ret(
|
||||
provider_.replay(const_cast<wsrep::ws_handle&>(
|
||||
client_state_.transaction().ws_handle()),
|
||||
provider_.replay(client_state_.transaction().ws_handle(),
|
||||
&client_state_));
|
||||
++replays_;
|
||||
return ret;
|
||||
|
@ -152,7 +152,8 @@ namespace wsrep
|
||||
return release_result_;
|
||||
}
|
||||
|
||||
enum wsrep::provider::status replay(wsrep::ws_handle&, void* ctx)
|
||||
enum wsrep::provider::status replay(const wsrep::ws_handle&,
|
||||
void* ctx)
|
||||
{
|
||||
wsrep::client_state& cc(
|
||||
*static_cast<wsrep::client_state*>(ctx));
|
||||
|
Submodule wsrep-API/v26 updated: 7b2ee90d67...a306d72fd9
Reference in New Issue
Block a user