diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-18 12:49:10 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-18 12:49:10 +0300 |
commit | 18eab4a83280049974265358b0d78389d05cd67b (patch) | |
tree | 2398474f2621a04cfacad05225275701fcc0c922 /sql/field.h | |
parent | 9068020efe8f8b0161ea0e48a89fb90fcd8e59aa (diff) | |
download | mariadb-git-18eab4a83280049974265358b0d78389d05cd67b.tar.gz |
MDEV-26682 Replication timeouts with XA PREPAREbb-10.5-MDEV-26682
The purpose of non-exclusive locks in a transaction is to guarantee
that the records covered by those locks must remain in that way until
the transaction is committed. (The purpose of gap locks is to ensure
that a record that was nonexistent will remain that way.)
Once a transaction has reached the XA PREPARE state, the only allowed
further actions are XA ROLLBACK or XA COMMIT. Therefore, it can be
argued that only the exclusive locks that the XA PREPARE transaction
is holding are essential.
Furthermore, InnoDB never preserved explicit locks across server restart.
For XA PREPARE transations, we will only recover implicit exclusive locks
for records that had been modified.
Because of the fact that XA PREPARE followed by a server restart will
cause some locks to be lost, we might as well always release all
non-exclusive locks during the execution of an XA PREPARE statement.
lock_release_on_prepare(): Release non-exclusive locks on XA PREPARE.
trx_prepare(): Invoke lock_release_on_prepare() unless the
isolation level is SERIALIZABLE or this is an internal distributed
transaction with the binlog (not actual XA PREPARE statement).
This has been discussed with Sergei Golubchik and Andrei Elkin.
Reviewed by: Sergei Golubchik
Diffstat (limited to 'sql/field.h')
0 files changed, 0 insertions, 0 deletions