Ladsgroup added a comment.
I think I found out what's happening here. I tracked down one case of it happening which is this edit: https://www.wikidata.org/w/index.php?diff=1138568411 causing this: https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-mediawiki-2020.03.19/mediawiki/?id=AXDzmOx6KWrIH1QRGQJO Why? This edit happening almost at the same time: https://www.wikidata.org/w/index.php?diff=1138568386 Both edits introduce a new text for the term store at the same time and the code tries to read it, it can't (because it doesn't exist yet) then it tries to insert it, it can't (because the other thread already put it there) then it tries to read it again (because it couldn't insert, right?) but it can't find it which seems like a very logical thing to do to throw a logic error (narrator: it's not). The reason that the second read can't read the ghost row is MySQL's default locking level: "REPEATABLE_READ". I guess that's explanatory enough. when you read from master from one transaction, MySQL gives you the old version due to MVCC but it doesn't let you insert it either. I don't know what would be the right solution right now but I will find it. TASK DETAIL https://phabricator.wikimedia.org/T247553 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ladsgroup Cc: Addshore, WMDE-leszek, brennen, Agusbou2015, Jdforrester-WMF, Liuxinyu970226, Aklapper, nnikkhoui, Hazizibinmahdi, Iflorez, darthmon_wmde, alaa_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Rxy, Jay8g, Krenair
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs