mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
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.
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);
|
||||
@ -215,8 +213,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
|
||||
{
|
||||
@ -245,12 +244,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_;
|
||||
|
Reference in New Issue
Block a user