replication on tm-sumo01-master (and slaves)

RESOLVED FIXED

Status

RESOLVED FIXED
7 years ago
4 years ago

People

(Reporter: scabral, Assigned: scabral)

Tracking

Details

(Assignee)

Description

7 years ago
slave stopped with a duplicate key error:

                 Last_Error: Error 'Duplicate entry 'Firefox crashes when loading certain pages-en-US' for key 2' on query. Default database: 'support_mozilla_com'. Query: 'UPDATE `wiki_document` SET `title` = 'Firefox crashes when loading certain pages', `slug` = 'Firefox crashes when loading certain pages', `is_template` = 0, `is_localizable` = 1, `locale` = 'en-US', `current_revision_id` = 19431, `latest_localizable_revision_id` = 19431, `parent_id` = NULL, `html` = '<p>REDIRECT <a href=\"/en-US/kb/Firefox%20crashes\">Firefox crashes</a>\n</p>', `category` = 10, `is_archived` = 0, `allow_discussion` = 1, `needs_change` = 0, `needs_change_comment` = '' WHERE `wiki_document`.`id` = 8702'
(Assignee)

Updated

7 years ago
Assignee: server-ops-database → scabral
Status: NEW → ASSIGNED
(Assignee)

Comment 1

7 years ago
The problem is that the entry 768 already has this title/slug, so foreign keys fail.  That entry does not exist on the master, support01.  We'll have to do a checksum to see if there are any other missing fields, but for now I've changed the title/slug to have different spacing on the slaves, so replication could continue.  There were 2 entries that had this problem:

Title: 'Firefox crashes when loading certain pages'
Title: 'Flash-based videos and sound do not play   correctly'

both were en_US locale.

Here's what I did:


use support_mozilla_com;
set sql_log_bin=0;

update wiki_document set title='Firefox crashes when loading certain   pages', slug=title where id=786;

insert ignore into wiki_revision 
(id,document_id, summary, content, created, reviewed, comment, reviewer_id,
creator_id, is_approved, is_ready_for_localization)
VALUES
(19431,
8702,
'Just a redirect.',
'REDIRECT [[Firefox crashes]]',
'2011-12-06 08:36:28',
'2011-12-06 08:37:01',
'Redirect to "Firefox crashes"',
179845,
179845,1,1);

update wiki_document set title='Flash-based videos and sound do not play   correctly', slug=title where id=479;
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Comment 2

7 years ago
Re-opening this - we should do a checksum on these machines and resolve discrepancies.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 3

7 years ago
Synced the following tables in support_mozilla_com:
dashboards_wikidocumentvisits
forums_thread
wiki_document
wiki_document_contributors
wiki_helpfulvote
wiki_relateddocument
Assignee: scabral → server-ops-database
Status: REOPENED → ASSIGNED

Updated

7 years ago
Duplicate of this bug: 713538
Failed again on tm-sumo01-master01:

Last_Error: Error 'Cannot add or update a child row: a foreign key constraint fails (`support_mozilla_com/wiki_revision`, CONSTRAINT `based_on_id_refs_id_cf0bcfb3` FOREIGN KEY (`based_on_id`) REFERENCES `wiki_revision` (`id`))' on query. Default database: 'support_mozilla_com'. Query: 'INSERT INTO `wiki_revision` (`document_id`, `summary`, `content`, `keywords`, `created`, `reviewed`, `significance`, `comment`, `reviewer_id`, `creator_id`, `is_approved`, `based_on_id`, `is_ready_for_localization`) VALUES (8839, 'Just a redirect.', 'REDIRECT [[Video or audio does not play]]', '', '2011-12-27 16:26:19', NULL, NULL, 'REDIRECT', NULL, 191, 0, 19748, 0)'
(Assignee)

Comment 6

7 years ago
Fixed, but I'll note that I had to insert:

INSERT INTO `wiki_document` VALUES (8839,'Flash ベースのビデオや音声が正しく再生されない','ja',NULL,NULL,8772,'',10,'Flash-based videos and sound do not play correctly',0,0,0,1,0,'');


And then it tried to insert it again, so I skipped that.  So I think there's some timing issues, and perhaps it relates to the UTF-8 characters?  I did sync these tables, so there's no missing data as of the time I sync'd them.

Comment 7

7 years ago
Is this done?
Assignee: server-ops-database → scabral
(Assignee)

Comment 8

7 years ago
yes, done.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED
Product: mozilla.org → Data & BI Services Team
You need to log in before you can comment on or make changes to this bug.