wsrep hton refactoring

Bug #1243150 reported by Teemu Ollakka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Released
Medium
Teemu Ollakka
5.6
Fix Released
Medium
Teemu Ollakka
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

This ticket is used to track wsrep hton refactoring efforts which are not directly related to certain bugs.

Analysis of several bugs has indicated that wsrep hton and state code is overly complicated and easily leads to situations which are extremely hard to diagnose and debug. Some of the recent observations:

1) Transaction cleanup is done in wsrep_cleanup_transaction() which is called from thd->transaction.cleanup(). This kind of decoupling from wsrep_commit()/wsrep_rollback() calls requires extra state LOCAL_COMMIT and extra variable thd->wsrep_seqno_changed. Better to move cleanup/state reset to happen in wsrep_commit()/wsrep_rollback() and after replay/TOI end.

2) Cleanup and state reset after transaction finishes is incomplete and inconsistent. Some of the variables retain their non default values over transaction boundaries which may generate situations where after-crash diagnosis is impossible without extensive debug logs due to uncertainty of the state.

3) Insufficient amount of debug time sanity checks.

Some of the recent bugs that are directly or indirectly related to issues described above:

https://bugs.launchpad.net/codership-mysql/+bug/1237889
https://bugs.launchpad.net/codership-mysql/+bug/1240567
https://bugs.launchpad.net/codership-mysql/+bug/1123233

Revision history for this message
Teemu Ollakka (teemu-ollakka) wrote :
Revision history for this message
Teemu Ollakka (teemu-ollakka) wrote :
Revision history for this message
Teemu Ollakka (teemu-ollakka) wrote :

Rest of the wsrep patch refactoring and cleanup should go to lp:1233627.

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

cleanup for IO cache is missing in slave thread (applier)
This is added for wsrep-5.6 branch in revision: http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/4001

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

Slave thread writes binlog events when binlogging has not been enabled. This is obsolete, as slave transaction will not be replicated further. An Extended fix was pushed in wsrep-5.6 branch where both slave thread (applier) and replaying thread, skip binlog operations, if binlog is not enabled.

The actual fix goes in revision: http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/4002
Revision: http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/4003 removes the original fix in revision #4001, which is now obsolete.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1485

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.