1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Pass ws_meta to high priority service apply_toi

This commit is contained in:
Teemu Ollakka
2018-07-03 08:58:25 +03:00
parent 3632e7823c
commit e6d78c380d
6 changed files with 11 additions and 6 deletions

View File

@ -32,7 +32,9 @@ int db::high_priority_service::apply_write_set(const wsrep::const_buffer&)
return 0; return 0;
} }
int db::high_priority_service::apply_toi(const wsrep::const_buffer&) int db::high_priority_service::apply_toi(
const wsrep::ws_meta&,
const wsrep::const_buffer&)
{ {
throw wsrep::not_implemented_error(); throw wsrep::not_implemented_error();
} }

View File

@ -21,7 +21,7 @@ namespace db
int apply_write_set(const wsrep::const_buffer&) override; int apply_write_set(const wsrep::const_buffer&) override;
int commit() override; int commit() override;
int rollback() override; int rollback() override;
int apply_toi(const wsrep::const_buffer&) override; int apply_toi(const wsrep::ws_meta&, const wsrep::const_buffer&) override;
void after_apply() override; void after_apply() override;
void store_globals() override { } void store_globals() override { }
void reset_globals() override { } void reset_globals() override { }

View File

@ -65,7 +65,8 @@ namespace wsrep
* TOI operation is a standalone operation and should not * TOI operation is a standalone operation and should not
* be executed as a part of a transaction. * be executed as a part of a transaction.
*/ */
virtual int apply_toi(const wsrep::const_buffer&) = 0; virtual int apply_toi(const wsrep::ws_meta&,
const wsrep::const_buffer&) = 0;
/** /**
* Actions to take after applying a write set was completed. * Actions to take after applying a write set was completed.

View File

@ -180,7 +180,7 @@ namespace
{ {
// Regular toi // Regular toi
provider.commit_order_enter(ws_handle, ws_meta); provider.commit_order_enter(ws_handle, ws_meta);
int ret(high_priority_service.apply_toi(data)); int ret(high_priority_service.apply_toi(ws_meta, data));
provider.commit_order_leave(ws_handle, ws_meta); provider.commit_order_leave(ws_handle, ws_meta);
return ret; return ret;
} }

View File

@ -54,7 +54,8 @@ int wsrep::mock_high_priority_service::rollback()
client_state_->after_rollback()); client_state_->after_rollback());
} }
int wsrep::mock_high_priority_service::apply_toi(const wsrep::const_buffer&) int wsrep::mock_high_priority_service::apply_toi(const wsrep::ws_meta&,
const wsrep::const_buffer&)
{ {
assert(client_state_->transaction().active() == false); assert(client_state_->transaction().active() == false);
assert(client_state_->toi_meta().seqno().is_undefined() == false); assert(client_state_->toi_meta().seqno().is_undefined() == false);

View File

@ -35,7 +35,8 @@ namespace wsrep
int apply_write_set(const wsrep::const_buffer&) WSREP_OVERRIDE; int apply_write_set(const wsrep::const_buffer&) WSREP_OVERRIDE;
int commit() WSREP_OVERRIDE; int commit() WSREP_OVERRIDE;
int rollback() WSREP_OVERRIDE; int rollback() WSREP_OVERRIDE;
int apply_toi(const wsrep::const_buffer&) WSREP_OVERRIDE; int apply_toi(const wsrep::ws_meta&,
const wsrep::const_buffer&) WSREP_OVERRIDE;
void after_apply() WSREP_OVERRIDE; void after_apply() WSREP_OVERRIDE;
void store_globals() WSREP_OVERRIDE { } void store_globals() WSREP_OVERRIDE { }
void reset_globals() WSREP_OVERRIDE { } void reset_globals() WSREP_OVERRIDE { }