1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-08-05 04:01:12 +03:00

Removed SR store implementation detail from wsrep-lib

The following was moved to application side implementation:

- Removed sr_store from streaming context.
- Removed sr_state from transaction.
- Removed get_binlog_cache() from client_service interface.

Other:
- Add SR applier reference to append_fragment_and_commit() to
  make it available for application.
- Add separate interface call to rollback SR transactions
  on disconnect. Rolling back SR transactions due to rollback
  fragment and rolling back SR transactions due to disconnect have
  different behaviors. Have separate calls for these different
  cases for clarity.
- Remove non-const transaction accessor, not needed anymore because
  SR state has been moved to application side.
- Remove unneeded set_fragments_from_table().
This commit is contained in:
Teemu Ollakka
2022-09-28 17:30:39 +03:00
parent a44484e461
commit f3c8392ea8
16 changed files with 54 additions and 169 deletions

View File

@@ -88,8 +88,7 @@ int db::high_priority_service::commit(const wsrep::ws_handle& ws_handle,
}
int db::high_priority_service::rollback(const wsrep::ws_handle& ws_handle,
const wsrep::ws_meta& ws_meta,
bool)
const wsrep::ws_meta& ws_meta)
{
client_.client_state_.prepare_for_ordering(ws_handle, ws_meta, false);
int ret(client_.client_state_.before_rollback());
@@ -100,6 +99,17 @@ int db::high_priority_service::rollback(const wsrep::ws_handle& ws_handle,
return ret;
}
int db::high_priority_service::rollback_sr_on_disconnect()
{
auto ret = client_.client_state_.before_rollback();
assert(ret == 0);
client_.se_trx_.rollback();
ret = client_.client_state_.after_rollback();
assert(ret == 0);
return ret;
}
void db::high_priority_service::adopt_apply_error(wsrep::mutable_buffer& err)
{
client_.client_state_.adopt_apply_error(err);