got a weird issue. I have a cron that runs and rapidly inserts multiple records in the db, and also have a web app that may insert at the same time. Neither query specifies the primary key field in the sql; both leaving it up to the auto_increment value. 99% of the time it works fine, but periodically we get the following error on the slave only (never on the primary):
Its a standard master/slave setup (i.e. not dual master). I have no clue why the slave would be trying to insert a record with an id already in the table, especially considering the primary key isn't even specified in the query. But then again, I don't fully know how the master/slave sync process works.
Code:
30509 22:21:04 [ERROR] Slave SQL: Error 'Duplicate entry '2024638' for key 'PRIMARY'' on query. Default database: 'DBNAME'. Query: 'INSERT INTO `TABLENAME` (`FirstName`, ...
Its a standard master/slave setup (i.e. not dual master). I have no clue why the slave would be trying to insert a record with an id already in the table, especially considering the primary key isn't even specified in the query. But then again, I don't fully know how the master/slave sync process works.