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

Avoid connecting to unhealthy TiDB during session migration #408

Closed
djshow832 opened this issue Dec 1, 2023 · 0 comments · Fixed by #412
Closed

Avoid connecting to unhealthy TiDB during session migration #408

djshow832 opened this issue Dec 1, 2023 · 0 comments · Fixed by #412
Assignees
Labels
enhancement New feature or request

Comments

@djshow832
Copy link
Collaborator

Background

In serverless, this may happen:

  1. TiProxy migrates a session from TiDB1 to TiDB2
  2. The session is in a long transaction, so it doesn't migrate immediately
  3. Gateway removes TiDB2 and notifies TiProxy
  4. The session has finished the transaction and begins migration
  5. Since TiDB2 is down, the dial fails
  6. The session keeps running on TiDB1 and waits for the next migration

The problem is in step 5. It makes too many unnecessary errors.

Proposal

In step 5, check the status of TiDB2 again. If it's down, stop migration and return failure directly.

@djshow832 djshow832 added the enhancement New feature or request label Dec 1, 2023
@djshow832 djshow832 self-assigned this Dec 14, 2023
@ti-chi-bot ti-chi-bot bot closed this as completed in #412 Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant