[MDEV-11121] Master - Slave Replication - Duplicate key error Created: 2016-10-24 Updated: 2017-01-23 Resolved: 2017-01-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.20 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | jisun bae | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
CentOS release 6.7 / MariaDB 10.0.20 |
||
| Attachments: |
|
| Description |
|
Our architecture is MariaDB Replication(Master - Slave) and Slave DB is read only mode. 2016 10/20 , We got a error. The error message is below.
We have not had super privileges except root and replication user. The primary key of table(system_sd_sync) is a sequence using a funtion & innodb engine table. Master's data is valid but Slave's data is not valid. I don't know what is mean slave's data. |
| Comments |
| Comment by Elena Stepanova [ 2016-10-24 ] |
|
1) The error simply says that there is a record with cmd_id='200001986744' on the slave already. Please check whether it's so. If it is, please search all master's binary logs for this ID to find where the 2nd occurrence came from. |
| Comment by jisun bae [ 2016-10-26 ] |
|
Our system is operating after June. So, I restored backup file on Slave DB. I want to know the cause. |
| Comment by Elena Stepanova [ 2016-12-24 ] |
|
Sorry, I don't understand what you mean by "There was no master's binary log using next sequence number before error time. And the sequence table is only used user function.". For the possible causes, it's impossible to say without analyzing all the binary logs, and as also mentioned before, you might have run onto a bug fixed in a later version ( If you keep getting the same problem, it definitely makes sense to upgrade to a recent version to pick up all the fixes that have been made over the last 1.5 years. If you have never had the problem again after restoring from the backup, the more likely reason is an operational error of some sort. |
| Comment by Sergei Golubchik [ 2017-01-23 ] |
|
No feedback for a month, closing. |