-
Notifications
You must be signed in to change notification settings - Fork 32
K8SPS-517 resolve MySQL clone operation timeout and connection issues #1055
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
Open
hors
wants to merge
8
commits into
main
Choose a base branch
from
K8SPS-517
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+618
−12
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
This commit fixes multiple issues that were preventing MySQL clone operations from completing successfully: **Root Cause**: The MySQL driver's read timeout was set to only 10 seconds, causing clone operations to be interrupted after ~10 seconds with error 1317 (query execution interrupted) followed by error 1160 (communication packet error). **Changes Made**: 1. **Increased Default Timeouts**: - Read timeout: 10s → 3600s (1 hour) for long-running operations - Write timeout: 10s → 3600s (1 hour) to match read timeout - Clone timeout: Added 3600s (1 hour) default for clone operations 2. **Enhanced Error Handling**: - Added specific handling for MySQL error 1317 (query interrupted) - Added specific handling for MySQL error 1160 (communication error) - Improved error messages with detailed context 3. **Fixed SQL Syntax**: - Corrected CLONE INSTANCE statement to use proper ?@?:? placeholder format - Ensured proper parameter separation for MySQL driver compatibility 4. **Added Clone Validation**: - Added getCloneStatus() method to verify clone completion - Added getCloneStatusDetails() for detailed error reporting - Enhanced clone status validation with comprehensive error messages 5. **Updated Configuration**: - Modified DSN generation to use configurable timeouts - Updated DBParams to include CloneTimeoutSeconds parameter - Added environment variable support via BOOTSTRAP_CLONE_TIMEOUT 6. **Comprehensive Testing**: - Added unit tests for all new timeout functionality - Added tests for clone status validation and error handling - Added tests for SQL statement format and parameter handling - Updated existing tests to reflect new timeout defaults **Impact**: - Clone operations now complete successfully without timeout interruptions - Better error reporting for debugging clone issues - Configurable timeouts via environment variables - Comprehensive test coverage for clone functionality
commit: bbdff07 |
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.
This commit fixes multiple issues that were preventing MySQL clone operations from completing successfully:
Root Cause: The MySQL driver's read timeout was set to only 10 seconds, causing clone operations to be interrupted after ~10 seconds with error 1317 (query execution interrupted) followed by error 1160 (communication packet error).
Changes Made:
Increased Default Timeouts:
Enhanced Error Handling:
Fixed SQL Syntax:
Added Clone Validation:
Updated Configuration:
Comprehensive Testing:
Impact:
CHANGE DESCRIPTION
Problem:
Short explanation of the problem.
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
Config/Logging/Testability