forked from github/gh-ost
-
Notifications
You must be signed in to change notification settings - Fork 1
Create a hook to capture copy batch errors and retries #2
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
Merged
Conversation
This file contains hidden or 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
25b8983 to
325259e
Compare
Co-authored-by: Bastian Bartmann <[email protected]>
Co-authored-by: Bastian Bartmann <[email protected]>
e98fb12 to
e018cc3
Compare
CalculateNextIterationRangeEndValues needs to be recomputed on every retry in case of configuration (e.g. chunk-size) changes were made by onBatchCopyRetry hooks.
…e insert completes - extract MigrationContext.SetNextIterationRangeValues outside of applyCopyRowsFunc, so that it doesn't run on retries - add an integration test for Migrator with retry hooks Co-authored-by: Bastian Bartmann <[email protected]>
e018cc3 to
a48cae1
Compare
a5224bd to
d74db84
Compare
riccardo-casazza
approved these changes
May 15, 2025
riccardo-casazza
left a comment
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.
If we reach the chunk size = 10 (the minimum supported by gh-ost), the schema migrations fails definitely, right?
Member
Author
|
Yep, |
coding-chimp
approved these changes
May 16, 2025
grodowski
added a commit
that referenced
this pull request
Nov 4, 2025
* Execute hook on every batch insert retry Co-authored-by: Bastian Bartmann <[email protected]> * Expose the last error message to the onBatchCopyRetry hook Co-authored-by: Bastian Bartmann <[email protected]> * Remove double retries CalculateNextIterationRangeEndValues needs to be recomputed on every retry in case of configuration (e.g. chunk-size) changes were made by onBatchCopyRetry hooks. * include dev.yml (temp for Shopify) * Update doc/hooks.md * Remove dev.yml * Fix retry issue where MigrationIterationRangeMinValues advances before insert completes - extract MigrationContext.SetNextIterationRangeValues outside of applyCopyRowsFunc, so that it doesn't run on retries - add an integration test for Migrator with retry hooks Co-authored-by: Bastian Bartmann <[email protected]> * Add localtest that expects gh-ost to fail on exhausted retries * Rename method --------- Co-authored-by: Bastian Bartmann <[email protected]>
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.
Issue link: github#1499 and associated upstream PR: github#1507.