Skip to content

Commit

Permalink
server: refactor params of askSplit call (#8537)
Browse files Browse the repository at this point in the history
close #5014

Signed-off-by: qingfeng777 <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
qingfeng777 and ti-chi-bot[bot] authored Aug 21, 2024
1 parent 6bf980d commit 2e8f20f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1756,10 +1756,7 @@ func (s *GrpcServer) AskSplit(ctx context.Context, request *pdpb.AskSplitRequest
"missing region for split"),
}, nil
}
req := &pdpb.AskSplitRequest{
Region: request.Region,
}
split, err := rc.HandleAskSplit(req)
split, err := rc.HandleAskSplit(request)
if err != nil {
return &pdpb.AskSplitResponse{
Header: s.wrapErrorToHeader(pdpb.ErrorType_UNKNOWN, err.Error()),
Expand Down Expand Up @@ -1836,11 +1833,7 @@ func (s *GrpcServer) AskBatchSplit(ctx context.Context, request *pdpb.AskBatchSp
"missing region for split"),
}, nil
}
req := &pdpb.AskBatchSplitRequest{
Region: request.Region,
SplitCount: request.SplitCount,
}
split, err := rc.HandleAskBatchSplit(req)
split, err := rc.HandleAskBatchSplit(request)
if err != nil {
return &pdpb.AskBatchSplitResponse{
Header: s.wrapErrorToHeader(pdpb.ErrorType_UNKNOWN, err.Error()),
Expand Down

0 comments on commit 2e8f20f

Please sign in to comment.