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

Migrate label2test rows in batches #2496

Merged

Conversation

williamjallen
Copy link
Collaborator

#2390 added a migration which affects every row in the label2test table. MySQL is very inefficient at bulk updates, and real-world test have shown that the running time can be reduced by using small batches. This PR updates the migration to use a batching approach for both MySQL and Postgres.

@williamjallen
Copy link
Collaborator Author

@zackgalbreath Do you have any concerns about this approach compared to the patch you sent me?

@williamjallen williamjallen added this pull request to the merge queue Oct 10, 2024
Merged via the queue into Kitware:master with commit 1e44e4f Oct 10, 2024
6 checks passed
@williamjallen williamjallen deleted the label2test-migration-batching branch October 11, 2024 13:25
github-merge-queue bot pushed a commit that referenced this pull request Oct 21, 2024
…QL (#2506)

Users have reported compatibility issues with the recent batched update
approach used in several migrations, including #2496. MySQL 8.3 does not
support LIMIT clauses on multi-table update statements.

This PR changes the batching approach used for the two migrations
affected by these issues to avoid the problematic syntax.
github-merge-queue bot pushed a commit that referenced this pull request Nov 11, 2024
As reported in
#2552 (comment),
#2496 introduced a divide-by-zero error in the migration
`2024_08_24_160326_label2test_relationship_refactor`. This PR fixes the
issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants