lp:~sergei.glushchenko/percona-server/5.5-bug1092593-test
- Get this branch:
- bzr branch lp:~sergei.glushchenko/percona-server/5.5-bug1092593-test
Branch merges
Branch information
- Owner:
- Sergei Glushchenko
- Status:
- Development
Recent revisions
- 461. By Sergei Glushchenko on 2013-04-19
-
Bug 1092593: crash resistant replication doesn't work correctly after
change master or reset slave
- further might look rather unstructured; so one might benefit from
refreshing discussion here https://code.launchpad .net/~laurynas- biveinis/ percona- server/ bug1012715- 5.1/+merge/ 120042
before reading this
- this is how I imagine XA-transactions flow
* BEGIN do something PREPARE COMMIT BEGIN do something PREPARE COMMIT
* on each state ROLLBACK can be issued except after
the COMMIT has been completed successfully and BEGIN is not issued
(it this case ROLLBACK will just be noop)
* ROLLBACK should leave us somewhere before the BEGIN
- when InnoDB performs recovery it takes binlog position
from the "prepare" point.
- after this XA transaction can be reverted or committed
- if XA transaction is reverted then we take binlog position
from "commit" point which in this case is older than "prepare"
- if XA transaction is committed then we continue to use "prepare"
which in this case of same age as "commit" point
- this however does not work when XA transactions are not in use;
in this case we never write "prepare" points
- this might be masked by the fact that we never have real info
in "prepare" points so it's content is not overwrite MySQL *-info
files; it is still bad because we don't really have transactional
writes for binlog position as has been claimed in the documentation
- solution of this problem looks trivial for me; on commit we should
overwrite both "prepare" and "commit"; this doesn't make any harm
as after commit there is no way back to prepare anyway, so XA-case
continues to work
- non XA case will look as following
BEGIN do something COMMIT BEGIN do something COMMIT
* commit and prepare become the one commit point after which
there is no way back and it is reflected in our "commit" and
"prepare" points holding the same binlog position; rollback
is possible to the previous commit point only
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:percona-server/5.5