Skip to content

Commit

Permalink
Split the keys to search
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato committed Jan 17, 2025
1 parent 108b0a3 commit de256ce
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1532,14 +1532,12 @@ func (s *GrpcServer) GetRegionByID(ctx context.Context, request *pdpb.GetRegionB

// QueryRegion provides a stream processing of the region query.
func (s *GrpcServer) QueryRegion(stream pdpb.PD_QueryRegionServer) error {
if s.GetServiceMiddlewarePersistOptions().IsGRPCRateLimitEnabled() {
fName := currentFunction()
limiter := s.GetGRPCRateLimiter()
if done, err := limiter.Allow(fName); err == nil {
defer done()
} else {
return err
}
done, err := s.rateLimitCheck()
if err != nil {
return err
}
if done != nil {
defer done()
}

for {
Expand Down

0 comments on commit de256ce

Please sign in to comment.