[MDEV-31326] insert statement executed multiple times on slave Created: 2023-05-22 Updated: 2023-06-20 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.6.13 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Patrick Moiroux | Assignee: | Angelique Sklavounos (Inactive) |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Centos7 |
||
| Issue Links: |
|
||||||||
| Description |
|
After upgrade to version 10.6.13, replication stops with Error 'Duplicate entry'
We can see the Exec_Master_Log_Pos update from 316419163 to 316422802 , but it fails on the same insert. In binary logs the insert is done only once, at position 316425036 Here is what we have in the binary logs:
I will put the binary logs on the FTP server for confidentiality reasons. Thanks |
| Comments |
| Comment by Patrick Moiroux [ 2023-05-22 ] |
|
MDEV-31326.tgz uploaded to ftp.mariadb.org/private/ Thanks |
| Comment by Patrick Moiroux [ 2023-05-23 ] |
|
Hello, I don't think it's related to I checked on the master and the row is unique.. Each time I was skipping the insert on the slave, it was going further and having the same issue on another insert on that table ( 14028 inserts on that table in the file mysql-bin.000511) I skipped about 20 inserts, and then I updated the value of slave_parallel_threads from 128 to 1, and suddenly it worked without issue... So to summarize: With slave_parallel_threads =128 , it seems like multiple threads were trying to commit the same inserts. With slave_parallel_threads =1, slave was able to process the entire binary logs and to catch up the master... |
| Comment by Angelique Sklavounos (Inactive) [ 2023-05-24 ] |
|
Hi pmoiroux, Thanks for the report. I have some questions: 1) What was the process for the upgrade? Thank you. |
| Comment by Patrick Moiroux [ 2023-05-25 ] |
|
Hi Angelique, Yes both slave and master were upgraded (Slave first) and upgrade was standard: Stop the slave I uploaded the structure on the private folder: MDEV-31326.dump.tgz Thanks |
| Comment by Angelique Sklavounos (Inactive) [ 2023-05-26 ] |
|
Hi pmoiroux, Thanks for that. A few more questions/requests... 1) What was the old version of MariaDB before the upgrade? Thank you. |
| Comment by Patrick Moiroux [ 2023-05-26 ] |
|
Hello Angelique, 1) I was running 10.6.12 but was impacted by “InnoDB hang on B-tree split or merge ( 2) Output uploaded to MDEV-31326.output.tgz 3) Yes I still have the output of "SHOW SLAVE STATUS". uploaded as well 4) I did not execute CHANGE MASTER since I did the initial setup but the command I used was "CHANGE MASTER TO MASTER_HOST='XXXXX',MASTER_USER='repl',MASTER_PASSWORD='XXXXXX',MASTER_LOG_FILE='mysql-bin.000001',MASTER_LOG_POS=608;" Thanks, |