forked from wikimedia/mediawiki
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmeller-wikia
force-pushed
the
PLATFORM-10268
branch
2 times, most recently
from
January 3, 2025 08:24
670a1ce
to
44ffa66
Compare
mmeller-wikia
force-pushed
the
PLATFORM-10268
branch
3 times, most recently
from
January 7, 2025 09:11
3c2da2e
to
e41e1c9
Compare
…cript performance
mmeller-wikia
force-pushed
the
PLATFORM-10268
branch
from
January 7, 2025 13:51
e41e1c9
to
0569fc2
Compare
adpaste
approved these changes
Jan 8, 2025
…evision_comment_temp
mmeller-wikia
commented
Jan 10, 2025
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"; |
There was a problem hiding this comment.
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
approved these changes
Jan 10, 2025
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://fandom.atlassian.net/browse/PLATFORM-10268