Re: [Maria-developers] [Bug 544173] [NEW] Server crash for multi-engine transaction with binlog disabled
Hi Kristian On 22/03/2010, at 11:44 PM, Kristian Nielsen wrote:
Public bug reported: If using both PBXT and XtraDB in the same transaction, and log_bin is disabled, the server crashes: [...] Note, the crash only happens when log_bin is disabled.
As a sideline of this, we need a test that verifies that the two-phase commit process actually works. This could be done by starting a transaction, doing some write in both XtraDB and PBXT, but set things up in such a way that a commit will fail on one - perhaps Paul can provide a good idea for this - then the testcase can simply check the values in the XtraDB and PBXT tables afterwards to assess what happened. This test is as important as the above crash, because multi-engine transactions are something people will be using and thus relying on correctly working, however the code inside MySQL core that handles it is wholly untested. The test is of course also important to guard against regressions when other bugs around this code get found & fixed over time. Thanks Regards, Arjen. -- Arjen Lentz, Exec.Director @ Open Query (http://openquery.com) Exceptional Services for MySQL at a fixed budget. Follow our blog at http://openquery.com/blog/ OurDelta: packages for MySQL and MariaDB @ http://ourdelta.org
Arjen Lentz <arjen@openquery.com> writes:
As a sideline of this, we need a test that verifies that the two-phase commit process actually works.
This could be done by starting a transaction, doing some write in both XtraDB and PBXT, but set things up in such a way that a commit will fail on one - perhaps Paul can provide a good idea for this - then the testcase can simply check the values in the XtraDB and PBXT tables afterwards to assess what happened.
Yes. This is simple enough to do with DBUG. Just insert code that makes each engine fail in their prepare() when the appropriate DBUG flag is set. Another test we need is to have similar code to crash the server at the same points. Then on server restart check that the other engine does rollback.
This test is as important as the above crash, because multi-engine transactions are something people will be using and thus relying on correctly working, however the code inside MySQL core that handles it
Actually, I think it is best to avoid multi-engine transactions. There are a number of subtle points that complicate things, both with current code and in principle. (For example current code has no protection against another thransaction seeing a transient state with one engine committed and another not, even using START TRANSACTION WITH CONSISTENT SNAPSHOT. And there are fundamentally unsolvable problems with transactions that span both MVCC- and lock-based engines). There is a cool-ness factor to having multi-engine transaction working, of course (it would be very interesting to hear real-world use cases btw). But I agree that basic stuff should work, like the tests you suggested.
is wholly untested. The test is of course also important to guard against regressions when other bugs around this code get found & fixed over time.
Wholly untested with binlog disabled, yes. With binlog enabled, there are already two XA engines in play (innodb + binlog), so that part is better tested. - Kristian.
On Wed, Mar 24, 2010 at 5:28 PM, Arjen Lentz <arjen@openquery.com> wrote:
This test is as important as the above crash, because multi-engine transactions are something people will be using and thus relying on correctly working
I won't use this. We have enough problems when limited to one storage engine. All of those should be fixed first. If I want to use PBXT (and I do) then I will stop using InnoDB (and I might). When will we have cross-engine deadlock detection? -- Mark Callaghan mdcallag@gmail.com
Hi, MARK! On Mar 25, MARK CALLAGHAN wrote:
On Wed, Mar 24, 2010 at 5:28 PM, Arjen Lentz <arjen@openquery.com> wrote:
This test is as important as the above crash, because multi-engine transactions are something people will be using and thus relying on correctly working
I won't use this. We have enough problems when limited to one storage engine. All of those should be fixed first. If I want to use PBXT (and I do) then I will stop using InnoDB (and I might).
When will we have cross-engine deadlock detection?
When storage engines will start using a central server-wide deadlock detector (that exists). Regards, Sergei
participants (4)
-
Arjen Lentz
-
Kristian Nielsen
-
MARK CALLAGHAN
-
Sergei Golubchik