Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(PLATFORM-10268): optimize migrateLinksTable.php for pagelinks #112

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

mmeller-wikia
Copy link

@mmeller-wikia mmeller-wikia force-pushed the PLATFORM-10268 branch 2 times, most recently from 670a1ce to 44ffa66 Compare January 3, 2025 08:24
@mmeller-wikia mmeller-wikia force-pushed the PLATFORM-10268 branch 3 times, most recently from 3c2da2e to e41e1c9 Compare January 7, 2025 09:11
Comment on lines +77 to +84
// `coalesce` covers case when some row is missing in revision_comment_temp.
// Original script used `join` which skipped revision row when `revision_comment_temp` was null.
//
// Not sure whether we should try to fix the data first
// RevisionSelectQueryBuilder::joinComment suggest that all revisions should have rev_comment_id set
$query = "UPDATE revision
SET rev_comment_id = COALESCE((SELECT revcomment_comment_id FROM revision_comment_temp WHERE rev_id=revcomment_rev), rev_comment_id)
WHERE rev_id > $lowId AND rev_id <= $highId";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: skipping corrupted data. Same happened in the original script

@adpaste adpaste merged commit 25d3e79 into REL1_43-Fandom Jan 10, 2025
@adpaste adpaste deleted the PLATFORM-10268 branch January 10, 2025 12:08
adpaste pushed a commit that referenced this pull request Jan 10, 2025
)

* feat(PLATFORM-10268): optimize migrateLinksTable.php for pagelinks

* chore(PLATFORM-10268): improve migrateRevisionCommentTemp migration script performance

* fix(PLATFORM-10268): skip corrupted rows of revision when migrating revision_comment_temp

Note: this change might be dropped from fork after all wikis are updated to 1.43
adpaste pushed a commit that referenced this pull request Jan 10, 2025
)

* feat(PLATFORM-10268): optimize migrateLinksTable.php for pagelinks

* chore(PLATFORM-10268): improve migrateRevisionCommentTemp migration script performance

* fix(PLATFORM-10268): skip corrupted rows of revision when migrating revision_comment_temp

Note: this change might be dropped from fork after all wikis are updated to 1.43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants