Closed Bug 708045 Opened 13 years ago Closed 13 years ago

replication on tm-sumo01-master (and slaves)

Categories

(Data & BI Services Team :: DB: MySQL, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: scabral, Assigned: scabral)

References

Details

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: server-ops-database → scabral
Status: NEW → ASSIGNED
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
Closed: 13 years ago
Resolution: --- → FIXED
Re-opening this - we should do a checksum on these machines and resolve discrepancies.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
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
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)'
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.
Is this done?
Assignee: server-ops-database → scabral
yes, done.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago13 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.