[MDEV-32830] refactor XA binlogging for better integration with BGC/replication/recovery Created: 2023-11-17 Updated: 2024-01-19 |
|
| Status: | In Review |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Fix Version/s: | 11.5 |
| Type: | Task | Priority: | Critical |
| Reporter: | Andrei Elkin | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
|
The task is to improve on |
| Comments |
| Comment by Andrei Elkin [ 2023-11-17 ] | ||||||||||
|
Howdy Kristian! I implemented a big part of your review note coverage which improves upon While you're looking into it I am merging the former patch's slave code on the top of this commit. | ||||||||||
| Comment by Andrei Elkin [ 2023-11-17 ] | ||||||||||
|
serg, it'd be very helpful it you run through the commit - bb-10.6-andrei - as well. You'll find then - in how binlog_commit is made first to run hton - similarity to | ||||||||||
| Comment by Andrei Elkin [ 2023-11-17 ] | ||||||||||
|
Roel, howdy! Could you please run general and xa loads to validate the refactoring in bb-10.6-andrei. This is a base of the 2nd part of MDEV-31949 which is going to be pure slave changes. The base changes the bin-logging behavior for XA, but not only. | ||||||||||
| Comment by Roel Van de Paar [ 2023-11-20 ] | ||||||||||
|
Elkin Hi! I started testing. | ||||||||||
| Comment by Andrei Elkin [ 2023-11-20 ] | ||||||||||
|
roel, Marko is welcome to check but, the refactoring commit does not really dwell into Innodb. It changes, when log-bin = ON, though for the XA its local connection commit style from the pair of innobase_commit_ordered(), innobase_commit() to innobase_commit_by_xid() of the "external" (connection) commit branch. But I should have shortly for Marko a solely Innodb optimization commit that blocks `fsyncdata` for XA PREPARE in the log-bin = ON case. | ||||||||||
| Comment by Andrei Elkin [ 2023-11-20 ] | ||||||||||
|
knielsen,roel, serg, I had to correct lately found mistakes in new xa branches of MYSQL_BIN_LOG::run_ordered_commit(). The original commit's message is extended and the fixes are made as the 2nd commit: 88b0738b7c6...803e496ad0f HEAD -> bb-10.6-andrei. | ||||||||||
| Comment by Roel Van de Paar [ 2023-11-21 ] | ||||||||||
|
Created | ||||||||||
| Comment by Roel Van de Paar [ 2023-11-21 ] | ||||||||||
|
From what I have seen so far in bugs, we will definitely want an InnoDB review also. | ||||||||||
| Comment by Roel Van de Paar [ 2023-11-22 ] | ||||||||||
|
Created | ||||||||||
| Comment by Andrei Elkin [ 2023-11-22 ] | ||||||||||
|
Howdy Sergei. I am inviting to check this patch which is a base for MDEV-31949. This patch is planned to be followed with two more:
I'll invite you to check the latter one too later. | ||||||||||
| Comment by Roel Van de Paar [ 2023-11-27 ] | ||||||||||
|
| ||||||||||
| Comment by Roel Van de Paar [ 2023-11-28 ] | ||||||||||
|
Created MDEV-32896 Unstable XA + binglog tests, with possible MDEV-32830 caused issues, which blocks MTR testing of this ticket. | ||||||||||
| Comment by Roel Van de Paar [ 2023-12-07 ] | ||||||||||
|
Elkin FYI, here are some additional bugs I saw during the run (one UniqueID per line):
If there is interest in any of these I can attempt to create a testcase. | ||||||||||
| Comment by Andrei Elkin [ 2023-12-07 ] | ||||||||||
|
roel, it'd be good to see an original stack. Could you please paste one if still available. I am interested in the query the most at this point. If it won't be seen through the stack then it must be present in the general query log, so also please provide one. | ||||||||||
| Comment by Roel Van de Paar [ 2023-12-07 ] | ||||||||||
|
Elkin I have numbered the 10 UniqueID's above, and attached the stacks with failing queries and patch revision details as bug1.txt to bug10.txt. Note that 9 and 10 are from a previous iteration of the patch. If any of these are of interest, I can attempt to create a testcase for them. I also did a bit further checking and #5 and #7 appear in a non-patched version as well. | ||||||||||
| Comment by Andrei Elkin [ 2023-12-08 ] | ||||||||||
|
> and attached the stacks with failing queries | ||||||||||
| Comment by Andrei Elkin [ 2023-12-08 ] | ||||||||||
|
Some important update is reported to validate this MDEV's role. The ver1 of MDEV-31949 is finally proven to provide performance. | ||||||||||
| Comment by Andrei Elkin [ 2023-12-11 ] | ||||||||||
|
Roel, now that I am about to publish the final branch for review, these 1-10 needs checking on my branch. So I need now methods how to reproduce. To the rest, The 1 and 6 looks to be the same `rollback to savepoint a`, ideally I need an mtr test, bu any other way to reproduce would do for me, The case #10 is most probably a variant of MDEV-32455/ | ||||||||||
| Comment by Andrei Elkin [ 2023-12-11 ] | ||||||||||
|
> The case #10 is most probably a variant of MDEV-32455 Confirmed that. | ||||||||||
| Comment by Andrei Elkin [ 2023-12-19 ] | ||||||||||
|
Howdy Sergei! This task is ready for review in the form of a commit sum-lines with 'MDEV-32830 I. refactor..' in Looking forward for you notes. |