Skip to content

Conversation

@temeo
Copy link

@temeo temeo commented Feb 7, 2025

Prior to this change, wsrep overwrote xid used to prepare
a transaction with a xid containing wsrep seqno and UUID.
This however is not fully compatible with prtition engine
and atomic DDL recovery.

In order to avoid overwriting xid during prepare, store the
wsrep transaction seqno and UUID into Xid_log_event if the
transaction is wsrep transaction. This way the seqno and UUID
will be available to reconstruct the wsrep XID for commit
during binlog coordinated recovery.

This changes on-disk format of Xid_log_event to contain
additional 24 bytes for wsrep seqno and UUID if the
transaction is wsrep transaction. As Xid_log_event has no
meaning in replication and used only in recovery, the change
is backwards compatible.

The Xid_log_event output in mariadb-binlog is extended to
print also wsrep_seqno and wsrep_uuid if they are set.

@temeo temeo self-assigned this Feb 7, 2025
@temeo temeo force-pushed the main-wsrep-log-event branch 2 times, most recently from 603705c to 4409912 Compare February 11, 2025 09:45
@temeo temeo changed the title WIP: Record write set meta data into binlog events WIP: Store wsrep transaction seqno and UUID into Xid_log_event Feb 11, 2025
@temeo temeo force-pushed the main-wsrep-log-event branch from 4409912 to 2b6b8e6 Compare February 11, 2025 11:47
Prior to this change, wsrep overwrote xid used to prepare
a transaction with a xid containing wsrep seqno and UUID.
This however is not fully compatible with partition engine
and atomic DDL recovery.

In order to avoid overwriting xid during prepare, store the
wsrep transaction seqno and UUID into Xid_log_event if the
transaction is wsrep transaction. This way the seqno and UUID
will be available to reconstruct the wsrep XID for commit
during binlog coordinated recovery.

This changes on-disk format of Xid_log_event to contain
additional 24 bytes for wsrep seqno and UUID if the
transaction is wsrep transaction. As Xid_log_event has no
meaning in replication and used only in recovery, the change
is backwards compatible.

The Xid_log_event output in mariadb-binlog is extended to
print also wsrep_seqno and wsrep_uuid if they are set.
@temeo temeo force-pushed the main-wsrep-log-event branch from 2b6b8e6 to 3533329 Compare February 14, 2025 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants