Addshore added a comment.
So, it looks like this is probably a race condition within ReplicaMasterAwareRecordIdsAcquirer. It looks like generally the slave will be read ( i didnt look into isIgnoringReplica much but it looks like it is only used in restoreCleanedUpIds). If the records are not in the slave insertNonExistingRecordsIntoMaster will be called which does a plane insert not accounting or the possible race condition. And INSERT IGNORE here would probably solve this particular issue. The alternative would be check the slave, then check the master and then try the insert. But that is probably not the preferred solution for the scale we are talking about. TASK DETAIL https://phabricator.wikimedia.org/T226639 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore Cc: Addshore, darthmon_wmde, WMDE-leszek, Lydia_Pintscher, Lucas_Werkmeister_WMDE, alaa_wmde, Aklapper, Ladsgroup, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Jonas, Wikidata-bugs, aude, Jdforrester-WMF, Mbch331, Jay8g, Krenair
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
