pingcap / pingcap/tiproxy

Parallel the session migration process

Open
#421 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
73
Forks
41
Avg merge
21h 3m
Merged PRs (30d)
21

Description

Development Task

Currently, the process of session migration is serial:

  1. Query the session states
  2. Find a backend
  3. Connect to the backend and retry if it fails
  4. Read the initial handshake from the new backend
  5. Handshake with the new backend
  6. Set the session states into the new connection
  7. Disconnect the old connection

A long session migration may affect the query duration. We can do the 1st step while doing the 2nd, 3rd, and 4th steps. It may reduce the session migration duration.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating the session migration entry point and tracing the seven listed steps, then identify where the first query can overlap with backend connection and handshake work. Done means the migration performs the proposed overlap and its duration or query impact can be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.