[MDEV-4106] ALTER TABLE races in replication on slave side Created: 2013-01-28 Updated: 2013-03-14 Resolved: 2013-03-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Gordan Bobic | Assignee: | Elena Stepanova |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux RHEL6 |
||
| Description |
|
Setup: Master: Percona 5.5.24-rel26.0.256 On Master: CREATE TABLE `audit_publication_publication_rtb` ( This table is being inserted into constantly. I then run the following statement: This propagates fine to the Middle server. However, on the Slave server running MariaDB 10.0.0, this seems to cause replication to break: Slave_SQL_Running is No At a glance, it looks like the inserts in new format are somehow overtaking the alter table statement in the replication stream. |
| Comments |
| Comment by Elena Stepanova [ 2013-01-28 ] |
|
Hi Gordan, Can you locate and paste the fragments from the binary log files (master and middle servers) related to guilty statement/event and preceding it? Finding them in the middle server binlog is simple, since the slave's error log provides the exact binlog name and position where the problem occurred. Finding them in the master log might be trickier, but should also be possible. |
| Comment by Gordan Bobic [ 2013-01-28 ] |
|
Additional info: This replication failure also affects MySQL 5.6.6-m9. |
| Comment by Gordan Bobic [ 2013-01-28 ] |
|
I have uploaded a processed binog extract, with 100 preceeding and 100 following statements to ftp://ftp.askmonty.org/private/. The file name is prefixed with the ticket number. The slave reported the error at binlog position 495830995. |
| Comment by Elena Stepanova [ 2013-01-28 ] |
|
There has always been a fair share of race conditions in binary logging involving DDL, so generally it's likely to be a legacy bug. What makes your case unusual though, is that if your middle server only works as a slave for 'master' and as a master for 'slave', without any direct inflow, there should be no concurrency at all. If it executes the statements in the correct order, it should write them the same way. That's why it's interesting to see the binary logs from both servers. Do I understand correctly that you have the simple replication setup master => middle => slave, nothing fancy with slave using multi-master replication and getting updates from both master and middle? |
| Comment by Elena Stepanova [ 2013-01-28 ] |
|
Thank you, I will check the logs shortly. |
| Comment by Gordan Bobic [ 2013-01-28 ] |
|
The MySQL 5.6 server only had one master, but the MariaDB 10.0 server had extra masters (this was the main reason why we deployed them). None of the other masters, however, would have had that table on them. |
| Comment by Elena Stepanova [ 2013-01-28 ] |
|
Gordan, For the binary log file, this fragment does not contain the ALTER statement. Could you please extract the part where both ALTER and the guilty event (and some more after it) are included? Also, if you have access to the middle and slave servers, could you run SHOW CREATE TABLE for the table in question on each of them and provide the output? Finally, if possible, please attach your middle and slave cnf files. Thanks! |
| Comment by Elena Stepanova [ 2013-03-08 ] |
|
Hi Gordan, Are you still having the problem? Looking at the description again, I got a question. Are using any replicate-do-db, replicate-ignore-db, or replicate-rewrite-db options? So, if you are still interested in this report, please provide config files from all involved servers, and if possible the fragments of binary logs which contain the ALTER statement. Thanks. |
| Comment by Elena Stepanova [ 2013-03-14 ] |
|
Closing it as incomplete for now, if you have any new information, please add it to re-open the report. |