[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-27 Thread Stashbot
Stashbot added a comment. Mentioned in SAL (#wikimedia-operations) [2018-08-27T14:43:51Z] Running deduplicateArchiveRevId.php on gotwikibooks, kswikiquote, lvwikibooks, nostalgiawiki, wawikibooks and wikimania2005wiki for T202032TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-27 Thread Stashbot
Stashbot added a comment. Mentioned in SAL (#wikimedia-operations) [2018-08-27T14:42:44Z] Running deduplicateArchiveRevId.php on aawikibooks for T202032TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To:

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-27 Thread Anomie
Anomie added a comment. Note the above backport should wind up having almost no effect on live Wikimedia wikis at this time, since the only ones that seem affected by the MySQL bug are closed wikis where there's no ability to edit. The only effect should be two more SELECT MAX($field) FROM

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-27 Thread Stashbot
Stashbot added a comment. Mentioned in SAL (#wikimedia-operations) [2018-08-27T13:25:34Z] Synchronized php-1.32.0-wmf.18/includes/Storage/RevisionStore.php: Backport for T202032 (duration: 00m 49s)TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-27 Thread gerritbot
gerritbot added a comment. Change 40 merged by jenkins-bot: [mediawiki/core@wmf/1.32.0-wmf.18] Make sure we don't try to use a deleted rev ID. https://gerrit.wikimedia.org/r/40TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-27 Thread gerritbot
gerritbot added a comment. Change 40 had a related patch set uploaded (by Anomie; owner: Anomie): [mediawiki/core@wmf/1.32.0-wmf.18] Make sure we don't try to use a deleted rev ID. https://gerrit.wikimedia.org/r/40TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-23 Thread gerritbot
gerritbot added a comment. Change 453117 merged by jenkins-bot: [mediawiki/core@master] Make sure we don't try to use a deleted rev ID. https://gerrit.wikimedia.org/r/453117TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-22 Thread Anomie
Anomie added a comment. The affected wikis are: aawikibooks, cawiki, gotwikibooks, kswikiquote, lvwikibooks, nostalgiawiki, wawikibooks and wikimania2005wiki. cawiki does not seem to have any affected rows. Can you double check that that isn't a typo?TASK

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-21 Thread daniel
daniel added a comment. @Anomie I outlined an idea on the patch, can you tell me if that would work? I'm not sure I got the locking behavior right.TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Anomie,

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-21 Thread daniel
daniel added a comment. I just got hit by `Error: 1062 Duplicate entry '2871-1' for key 'PRIMARY' (localhost)` on my local machine, very likely caused by me deleting some pages, and then rebooting, causing mysql to be re-started. While this situation may be rare enough on a production system, it's

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-20 Thread Anomie
Anomie added a comment. Notes for self: MySQL (since 5.5, maybe earlier) will update the auto-increment value on insert with an explicit value for the ID column (but not update). So we'll do that to fix the value when the problem is detected, and have the deduplicate script do it too. Then re-run

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-16 Thread Anomie
Anomie added a comment. When hitting the first duplicate is the point. If rows A and B had the same ar_rev_id, the slots table would have been populated for A and then B would be the "first duplicate". If the deduplication decided to reassign A rather than B, we'd have the problem. Offhand I

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-16 Thread daniel
daniel added a comment. We'd then want to check in case any of the reassigned rows are the ones that populateContentTables.php had populated (versus being the rows that it errored out on). Or we could just blank the slots and content tables. populateContentTables.php failed when hitting the first

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-16 Thread daniel
daniel added a comment. The patch I made should protect against the edge case that @jcrespo mentioned. Not sure that it's worth the overhead given how unlikely we are to hit that situation, but that can be discussed on the ticket.TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-16 Thread gerritbot
gerritbot added a comment. Change 453117 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler): [mediawiki/core@master] Make sure we don't try to use a deleted rev ID. https://gerrit.wikimedia.org/r/453117TASK DETAILhttps://phabricator.wikimedia.org/T202032EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T202032: Duplicate ar_rev_id values in several wikis

2018-08-16 Thread daniel
daniel added a comment. The MCR write-both mode, with its unique index on slot_revision_id, should at least prevent conflicting rows from being inserted, although this potentially comes at the cost of throwing an exception on every edit until someone manually advances the autoincrement value for