mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-31 18:24:25 +03:00
Implemented SR transaction rollback.
This commit is contained in:
@ -35,11 +35,12 @@ int wsrep::mock_high_priority_service::apply_write_set(
|
||||
return (fail_next_applying_ ? 1 : 0);
|
||||
}
|
||||
|
||||
int wsrep::mock_high_priority_service::commit(const wsrep::ws_handle&,
|
||||
const wsrep::ws_meta&)
|
||||
int wsrep::mock_high_priority_service::commit(
|
||||
const wsrep::ws_handle& ws_handle,
|
||||
const wsrep::ws_meta& ws_meta)
|
||||
{
|
||||
|
||||
int ret(0);
|
||||
client_state_->prepare_for_ordering(ws_handle, ws_meta, true);
|
||||
if (client_state_->client_service().do_2pc())
|
||||
{
|
||||
ret = client_state_->before_prepare() ||
|
||||
|
@ -31,6 +31,8 @@ namespace wsrep
|
||||
int start_transaction(const wsrep::ws_handle&, const wsrep::ws_meta&)
|
||||
WSREP_OVERRIDE;
|
||||
|
||||
const wsrep::transaction& transaction() const
|
||||
{ return client_state_->transaction(); }
|
||||
void adopt_transaction(const wsrep::transaction&) WSREP_OVERRIDE;
|
||||
int apply_write_set(const wsrep::ws_meta&,
|
||||
const wsrep::const_buffer&) WSREP_OVERRIDE;
|
||||
|
@ -131,11 +131,11 @@ namespace wsrep
|
||||
enum wsrep::provider::status
|
||||
append_data(wsrep::ws_handle&, const wsrep::const_buffer&)
|
||||
{ return wsrep::provider::success; }
|
||||
int rollback(const wsrep::transaction_id)
|
||||
enum wsrep::provider::status rollback(const wsrep::transaction_id)
|
||||
{
|
||||
++fragments_;
|
||||
++rollback_fragments_;
|
||||
return 0;
|
||||
return wsrep::provider::success;
|
||||
}
|
||||
enum wsrep::provider::status
|
||||
commit_order_enter(const wsrep::ws_handle& ws_handle,
|
||||
|
Reference in New Issue
Block a user