pingcap / pingcap/tidb

domap cleanup

Open
#57,242 0 comments 4 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

`domap` is the biggest reason why `session` is closely coupled to `domain`. And we even have the following dirty code just to test cases where multiple domain exists.

https://github.com/pingcap/tidb/blob/1770006c2e8f40bcc79068e8d8210de0768a8b83/pkg/session/session.go#L3750-L3758

We can remove it by adding `store.GetOption/SetOption` to add additional context for storage.

Contributor guide

Open the contributing guide

Research direction

Start with the linked section of pkg/session/session.go around lines 3750-3758 and trace how domap, session, domain, and storage are coupled. Review the store interfaces and the proposed GetOption/SetOption context mechanism. Done means the dirty multiple-domain test handling can be removed while storage still receives the required context.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, distributed-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.