mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-31 18:24:25 +03:00
Squashed commit of the following:
commit3b419aa6e2
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Sun Feb 19 10:29:34 2023 +0200 Skip fetching config options if provider not loaded via wsrep-API commit044220cc06
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Wed Jul 13 10:31:03 2022 +0300 Operation context pointer for client state commiteeb05a9238
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Mon Jul 4 09:03:23 2022 +0300 Add unit test log in gitignore commit92a04070fc
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Sun May 8 12:45:36 2022 +0300 Added convenience method prev() to seqno commitf83ca1917e
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Sun May 1 16:37:24 2022 +0300 Pass victim context for provider on BF abort This change is needed for custom provider implementations to have a way to access the victim in the application context. Helper interface operation_context to pass caller context for service/provider callbacks in more type safe way. commit244eabe8cf
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Wed May 25 07:39:43 2022 +0300 Handle disconnecting state in on_sync() When disconnecting from the group, the sync event from the provider must not change the state back to synced. commitba8e23df0d
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Tue Mar 22 17:43:52 2022 +0200 Add provider position field to ws_meta and view Provider position is needed in coordinated recovery between application and provider. Pass the position info from provider to application to allow making it durable. commit53e60f64c9
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Sat Mar 19 14:45:57 2022 +0200 Reset TOI meta after releasing total order in provider This is to keep the TOI meta available in case the provider implementation needs it. commitbccb9997f2
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Mon Jan 3 11:19:58 2022 +0200 Fixed id ostream operator to print human readable ids commit6d0b37daaf
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com> Date: Wed Dec 15 16:37:45 2021 +0200 Silence unused variable warning commit4b8616f3d1
Author: Denis Protivensky <denis.protivensky@galeracluster.com> Date: Wed Dec 15 16:43:31 2021 +0300 Fix provider loading in test for release builds commit6df17812d9
Author: Denis Protivensky <denis.protivensky@galeracluster.com> Date: Tue Dec 14 20:28:56 2021 +0300 Introduce set_provider_factory() method for server_state This allows injecting an application allocated provider into server_state. After this virtual provider getter is unnecessary. Made the getter normal method and fixed unit tests accordingly.
This commit is contained in:
@ -116,9 +116,8 @@ namespace wsrep
|
||||
{
|
||||
++group_seqno_;
|
||||
wsrep::gtid gtid(group_id_, wsrep::seqno(group_seqno_));
|
||||
ws_meta = wsrep::ws_meta(gtid, stid,
|
||||
wsrep::seqno(group_seqno_ - 1),
|
||||
flags);
|
||||
ws_meta = wsrep::ws_meta(
|
||||
gtid, stid, wsrep::seqno(group_seqno_ - 1), flags, 0);
|
||||
return wsrep::provider::success;
|
||||
}
|
||||
else
|
||||
@ -127,16 +126,15 @@ namespace wsrep
|
||||
if (it->second.is_undefined())
|
||||
{
|
||||
ws_meta = wsrep::ws_meta(wsrep::gtid(), wsrep::stid(),
|
||||
wsrep::seqno::undefined(), 0);
|
||||
wsrep::seqno::undefined(), 0, 0);
|
||||
ret = wsrep::provider::error_certification_failed;
|
||||
}
|
||||
else
|
||||
{
|
||||
++group_seqno_;
|
||||
wsrep::gtid gtid(group_id_, wsrep::seqno(group_seqno_));
|
||||
ws_meta = wsrep::ws_meta(gtid, stid,
|
||||
wsrep::seqno(group_seqno_ - 1),
|
||||
flags);
|
||||
ws_meta = wsrep::ws_meta(
|
||||
gtid, stid, wsrep::seqno(group_seqno_ - 1), flags, 0);
|
||||
ret = wsrep::provider::error_bf_abort;
|
||||
}
|
||||
bf_abort_map_.erase(it);
|
||||
@ -214,8 +212,9 @@ namespace wsrep
|
||||
wsrep::gtid(group_id_, wsrep::seqno(group_seqno_)),
|
||||
wsrep::stid(server_id_, tc.id(), cc.id()),
|
||||
wsrep::seqno(group_seqno_ - 1),
|
||||
wsrep::provider::flag::start_transaction |
|
||||
wsrep::provider::flag::commit);
|
||||
wsrep::provider::flag::start_transaction
|
||||
| wsrep::provider::flag::commit,
|
||||
0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -244,12 +243,10 @@ namespace wsrep
|
||||
{
|
||||
++group_seqno_;
|
||||
wsrep::gtid gtid(group_id_, wsrep::seqno(group_seqno_));
|
||||
wsrep::stid stid(server_id_,
|
||||
wsrep::transaction_id::undefined(),
|
||||
wsrep::stid stid(server_id_, wsrep::transaction_id::undefined(),
|
||||
client_id);
|
||||
toi_meta = wsrep::ws_meta(gtid, stid,
|
||||
wsrep::seqno(group_seqno_ - 1),
|
||||
flags);
|
||||
wsrep::seqno(group_seqno_ - 1), flags, 0);
|
||||
++toi_write_sets_;
|
||||
if (flags & wsrep::provider::flag::start_transaction)
|
||||
++toi_start_transaction_;
|
||||
@ -259,6 +256,7 @@ namespace wsrep
|
||||
}
|
||||
|
||||
enum wsrep::provider::status leave_toi(wsrep::client_id,
|
||||
const wsrep::ws_meta&,
|
||||
const wsrep::mutable_buffer&)
|
||||
WSREP_OVERRIDE
|
||||
{ return wsrep::provider::success; }
|
||||
@ -311,6 +309,7 @@ namespace wsrep
|
||||
enum wsrep::provider::status
|
||||
bf_abort(wsrep::seqno bf_seqno,
|
||||
wsrep::transaction_id trx_id,
|
||||
wsrep::operation_context&,
|
||||
wsrep::seqno& victim_seqno)
|
||||
WSREP_OVERRIDE
|
||||
{
|
||||
|
Reference in New Issue
Block a user