[MDEV-9519] Start Slave on a Galera should error if master binlog_format=statement and wsrep_auto_increment_control=1 Created: 2016-02-04 Updated: 2019-03-06 Resolved: 2019-02-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Galera SST |
| Affects Version/s: | 10.1.11 |
| Fix Version/s: | 10.2.23, 10.3.13, 10.1.39, 10.4.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | VAROQUI Stephane | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | galera | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Data corruption will happen as soon as the galera cluster size change Let's take a table t made of single auto increment and the following binlog
Replication will break because the step of auto increment will change as soon the cluster size change. In statement base the master did not change the step and auto increment overlay will happen and corrupt the data ?
So this proposal is to introduce verbose error message at replication start to either change wsrep_auto_increment_control=1 or to use ROW based . |
| Comments |
| Comment by Kolbe Kegel (Inactive) [ 2016-05-26 ] |
|
I don't see how START SLAVE could fail in this case, since the START SLAVE command won't have any visibility into the content of the log. But perhaps the SQL thread could stop with an error if wsrep_auto_increment_control=1 and SET INSERT_ID is seen in the relay log. |
| Comment by Julius Goryavsky [ 2018-07-19 ] |
|
Proposed fix: https://github.com/MariaDB/server/pull/817 If we have a 2+ node cluster which is replicating from an async master and the binlog_format is set to STATEMENT and multi-row inserts are executed on a table with an auto_increment column such that values are automatically generated by MySQL, then the server node generates wrong auto_increment values, which (in some cases) are different from what was generated on the async master. The causes and fixes: 1. We need to improve processing of changing the auto-increment values after changing the cluster size. |
| Comment by Julius Goryavsky [ 2018-07-19 ] |
| Comment by Jan Lindström (Inactive) [ 2018-07-20 ] |
|
I have small improvements comments on git. |
| Comment by Julius Goryavsky [ 2018-07-24 ] |
|
Thanks, patch updated in accordance with the review |
| Comment by Julius Goryavsky [ 2018-07-27 ] |
|
Version for 10.1 branch: https://github.com/MariaDB/server/pull/827 |
| Comment by Jan Lindström (Inactive) [ 2018-07-30 ] |
|
See git for comments. |
| Comment by Julius Goryavsky [ 2018-08-14 ] |
|
I corrected all the regressions found and fixed another error that interfered with auto-increment inserts/updates in STATEMENT mode (with WSREP enabled) |
| Comment by Marko Mäkelä [ 2018-08-31 ] |
|
I reverted this for now due to regressions, which might have been fixed by |
| Comment by Julius Goryavsky [ 2019-02-15 ] |
|
Regressions are closed using |