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

server/grpc_service: new AskSplitRequest could be removed #5014

Closed
AndreMouche opened this issue May 23, 2022 · 1 comment · Fixed by #8537
Closed

server/grpc_service: new AskSplitRequest could be removed #5014

AndreMouche opened this issue May 23, 2022 · 1 comment · Fixed by #8537
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.

Comments

@AndreMouche
Copy link
Member

Enhancement Task

It seems we do not need to create a new AskSplit in the function AskSplitRegion, use request directly instead.

pd/server/grpc_service.go

Lines 1066 to 1072 in 9f10a51

if request.GetRegion() == nil {
return nil, errors.New("missing region for split")
}
req := &pdpb.AskSplitRequest{
Region: request.Region,
}
split, err := rc.HandleAskSplit(req)

@AndreMouche AndreMouche added the type/enhancement The issue or PR belongs to an enhancement. label May 23, 2022
@AndreMouche
Copy link
Member Author

Meanwhile, similar logic in AskBatchSplit

pd/server/grpc_service.go

Lines 1111 to 1115 in 9f10a51

req := &pdpb.AskBatchSplitRequest{
Region: request.Region,
SplitCount: request.SplitCount,
}
split, err := rc.HandleAskBatchSplit(req)

@AndreMouche AndreMouche added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Jun 14, 2022
@ti-chi-bot ti-chi-bot bot closed this as completed in 2e8f20f Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant