[MDEV-742] LP:803649 - Xa recovery failed on client disconnection Created: 2011-06-29 Updated: 2024-01-08 Resolved: 2020-03-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Fix Version/s: | 10.5.2 |
| Type: | Task | Priority: | Critical |
| Reporter: | Stephane VAROQUI (Inactive) | Assignee: | Andrei Elkin |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | Launchpad, upstream-fixed, verified | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Dispite prepare phase have been rich you will get nothing when doing a xa recover if the client get disconnected befor commit In the following php script an error is generated to force the COMMIT to failed cf:XA COMMITEE and close the connection.
|
| Comments |
| Comment by Rasmus Johansson (Inactive) [ 2011-06-29 ] | ||||||||||||||||||||||
|
Launchpad bug id: 803649 | ||||||||||||||||||||||
| Comment by Elena Stepanova [ 2013-06-02 ] | ||||||||||||||||||||||
|
Also reproducible on all MySQL versions (ancient bug http://bugs.mysql.com/bug.php?id=12161)
| ||||||||||||||||||||||
| Comment by Andrei Elkin [ 2019-08-23 ] | ||||||||||||||||||||||
|
maxmether, corrected. Thanx! | ||||||||||||||||||||||
| Comment by steen bartholdy [ 2019-12-12 ] | ||||||||||||||||||||||
|
Hi | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-01-13 ] | ||||||||||||||||||||||
|
Take-aways from discussions in Frankfurt: detach_prepared_tx() is ok replace_native_transaction_in_thd is redundant The idea behind this method is that it is needed on the slave. A slave worker
The problem with re-attaching is that Rdb_transaction has a quite a bit of context about the transaction outside the m_rocksdb_tx member. It is much better if the SQL layer uses the existing API and calls
There was another argument: both InnoDB and MyRocks try to re-use their internal transaction object. and this is why replace_trx_in_thd saves it away. And this is how we end up with method signatures like this:
My opinion is that this sort of caching should not be exposed through the storage engine API. | ||||||||||||||||||||||
| Comment by Andrei Elkin [ 2020-01-20 ] | ||||||||||||||||||||||
|
psergey, thanks for your notes! I think you have a good point to replace_native_transaction_in_thd which is indeed to arrange a form | ||||||||||||||||||||||
| Comment by Andrei Elkin [ 2020-02-03 ] | ||||||||||||||||||||||
|
Howdy, Sergei! Could you please check the patch. It's latest version is in bb-10.5-mdev_742. Thanks and cheers, Andrei | ||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2020-03-13 ] | ||||||||||||||||||||||
|
I do not think that the XA functionality can meaningfully be tested with DDL operations before | ||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2020-03-13 ] | ||||||||||||||||||||||
|
marko, definitely. Although the problem is not new: recovery wouldn't recover MDL locks. This patch just extends the problem a bit further. |