mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-08-06 15:02:41 +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:
@@ -93,12 +93,18 @@ namespace wsrep
|
||||
*
|
||||
* Note that the call is not done from streaming transaction
|
||||
* context, but from applier context.
|
||||
*
|
||||
* @param sr_hps Object that is hosting the streaming transaction.
|
||||
* @param ws_handle Write set handle corresponding to fragment.
|
||||
* @param ws_meta Write set meta data corresponding to fragment.
|
||||
* @param data Fragment data.
|
||||
* @param xid XID corresponding to streaming transaction.
|
||||
*/
|
||||
virtual int append_fragment_and_commit(
|
||||
high_priority_service& sr_hps,
|
||||
const wsrep::ws_handle& ws_handle,
|
||||
const wsrep::ws_meta& ws_meta,
|
||||
const wsrep::const_buffer& data,
|
||||
int sr_store,
|
||||
const wsrep::xid& xid) = 0;
|
||||
|
||||
/**
|
||||
@@ -146,8 +152,16 @@ namespace wsrep
|
||||
* @return Zero in case of success, non-zero in case of failure
|
||||
*/
|
||||
virtual int rollback(const wsrep::ws_handle& ws_handle,
|
||||
const wsrep::ws_meta& ws_meta,
|
||||
bool skip_rollback = false) = 0;
|
||||
const wsrep::ws_meta& ws_meta) = 0;
|
||||
|
||||
/**
|
||||
* Roll back a SR transaction when disconnecting from cluster.
|
||||
*
|
||||
* The implementation is supposed to roll back the transaction, but
|
||||
* keep the fragments in fragment store intact to allow recovering
|
||||
* the ongoing SR transactions on reconnect.
|
||||
*/
|
||||
virtual int rollback_sr_on_disconnect() = 0;
|
||||
|
||||
/**
|
||||
* Apply a TOI operation.
|
||||
|
Reference in New Issue
Block a user