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

Add application defined sequential consistency for certification

Client state methods before_prepare() and before_commit() accept
a callback which is called by the provider after it can guarantee
sequential consistency. This allows application threads which wish to
maintain sequential consistency to enter before_prepare() and
before_commit() calls concurrently without waiting the prior call
to finish.
This commit is contained in:
Teemu Ollakka
2024-11-21 14:29:11 +02:00
parent 1c61b809d1
commit 3de594b662
9 changed files with 113 additions and 31 deletions

View File

@ -175,11 +175,12 @@ namespace wsrep
int after_row();
int before_prepare(wsrep::unique_lock<wsrep::mutex>&);
int before_prepare(wsrep::unique_lock<wsrep::mutex>&,
const wsrep::provider::seq_cb_t*);
int after_prepare(wsrep::unique_lock<wsrep::mutex>&);
int before_commit();
int before_commit(const wsrep::provider::seq_cb_t*);
int ordered_commit();
@ -248,7 +249,8 @@ namespace wsrep
bool abort_or_interrupt(wsrep::unique_lock<wsrep::mutex>&);
int streaming_step(wsrep::unique_lock<wsrep::mutex>&, bool force = false);
int certify_fragment(wsrep::unique_lock<wsrep::mutex>&);
int certify_commit(wsrep::unique_lock<wsrep::mutex>&);
int certify_commit(wsrep::unique_lock<wsrep::mutex>&,
const wsrep::provider::seq_cb_t*);
int append_sr_keys_for_commit();
int release_commit_order(wsrep::unique_lock<wsrep::mutex>&);
void remove_fragments_in_storage_service_scope(