Open
Conversation
* Replace log.Fatale with context-based error propagation This patch modifies gh-ost to use a cancellable context instead of log.Fatale() in listenOnPanicAbort. When using gh-ost as a library, this allows the calling application to recover from aborts (e.g. log the failure reason) instead of having the entire process terminate via os.Exit(). Now we store the error and cancel a context to signal all goroutines to stop gracefully. * Fix shadowing * Simplify non-blocking poll * Simplify non-blocking poll in migrator.go * Fix error return * Fix hang on blocking channel send * Add defensive fix for other potential blocking channel send deadlocks * Add SendWithContext helper to avoid deadlocks * Fix deadlock on PanicAbort sends * Use checkAbort * Fix migration abort race condition * Remove buffer on PanicAbort channel
* Improve tests for various error scenarios
- Regex meta characters in index names should not break warning
detection (required code fix)
- Improve tests that only checked number of rows (need to validate data
as well)
- Test positive case allowing ignored duplicates on migration key
- Test behavior with PanicOnWarnings disabled
* Address Copilot feedback
* Add test for warnings on composite unique keys
* Add test for updating pk with duplicate
* Improve replica test debugging
- Print log excerpt on failure
- Upload full log artifacts on failure
* Reduce flakiness in update-pk test
* Revise test
* More robust test fix
* Make MySQL wait strategy less flaky
Removed the `wait.ForExposedPort()` override from test files. The tests
will now use the MySQL module's default wait strategy
(`wait.ForLog("port: 3306 MySQL Community Server")`), which properly
waits for MySQL to be ready to accept connections. Otherwise the port
may be exposed, but MySQL is still initializing and not ready to accept
connections.
* Customize update-pk integration test
Add support for test-specific execution so that we can guarantee that
we're specifically testing the DML apply phase
* Fix regression in integration test harness
* Add test timeouts and fix error propagation
Prevent indefinite test hangs by adding 120-second timeout and
duration reporting. Fix silent error drops by propagating errors from
background write goroutines to PanicAbort channel. Check for abort in
sleepWhileTrue loop and handle its error in cutOver.
* Add retry logic for instant DDL on lock wait timeout When attempting instant DDL, a lock wait timeout (errno 1205) may occur if a long-running transaction holds a metadata lock. Rather than failing immediately, retry the operation up to 5 times with linear backoff. Non-timeout errors (e.g. ALGORITHM=INSTANT not supported) still return immediately without retrying. * Fix int-to-Duration type mismatch in retry backoff --------- Co-authored-by: ybs-me <yosef.bensimchon@melio.com>
* Handle warnings in middle of DML batch * Add integration test for batch warnings * Update expected failure message for update-pk test --------- Co-authored-by: meiji163 <meiji163@github.com>
4edbdb6 to
2982cfe
Compare
forge33
approved these changes
Mar 31, 2026
* Add failing test for retry + abort issue * Fix retry after abort issue * Skip retries for warning errors Warning errors indicate data consistency issues that won't resolve on retry, so attempting to retry them is futile and causes unnecessary delays. This change detects warning errors early and aborts immediately instead of retrying. * Fix test expectation
Member
Author
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
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.
No description provided.