[MDEV-9214] Server miscalculates the number of XA-capable engines Created: 2015-11-30  Updated: 2015-12-22  Resolved: 2015-12-22

Status: Closed
Project: MariaDB Server
Component/s: Plugins, XA
Affects Version/s: 10.1
Fix Version/s: 10.1.10

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-9193 Upgrade from 10.0.22 to 10.1.9 fails Closed
Sprint: 10.1.10

 Description   

Apparently, 10.1 somehow wrongly counts the number of XA-capable engines. Here are some scenarios which make me think that:

  • start server with only one XA-capable engine, e.g. XtraDB;
  • see tc.log is created (already strange, it shouldn't do that, right?);
  • sigkill server;
  • start server with two XA-capable engines, e.g. XtraDB and TokuDB;
  • see the error message in the log:

    [ERROR] Recovery failed! You must enable exactly 2 storage engines that support two-phase commit protocol

    It should be 1, not 2, right?

or

  • start server with two XA-capable engines, e.g. XtraDB and TokuDB;
  • see tc.log is created;
  • sigkill server;
  • start server without TokuDB;
  • see the error message in the log:

    [ERROR] Recovery failed! You must enable exactly 3 storage engines that support two-phase commit protocol

    It should be 2, not 3, right?



 Comments   
Comment by Elena Stepanova [ 2015-11-30 ]

I've set it up on perro.
Log in as usual.

cd ~/mdev9214/10.1/mysql-test
perl ./mtr mdev9214

The test runs with XtraDB and TokuDB at first, then restarts the server without TokuDB and fails with

2015-11-30 23:08:49 140046048638848 [ERROR] Recovery failed! You must enable exactly 3 storage engines that support two-phase commit protocol
2015-11-30 23:08:49 140046048638848 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2015-11-30 23:08:49 140046048638848 [ERROR] Can't init tc log
2015-11-30 23:08:49 140046048638848 [ERROR] Aborting

Comment by Elena Stepanova [ 2015-12-01 ]

The unpleasant side-effect is that while 10.0 started with only one XA-capable engine (which is the most common situation) does not care about a stale tc.log, 10.1 does, and can fail to start. I think it was the reason of the problem in MDEV-9193.

Generated at Thu Feb 08 07:33:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.