Skip to content

Commit

Permalink
Merge branch 'master' into sche-redirect9
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot[bot] authored Nov 7, 2023
2 parents b8f59a1 + 356066a commit 860ea5c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2632,7 +2632,13 @@ func (s *GrpcServer) getGlobalTSOFromTSOServer(ctx context.Context) (pdpb.Timest
if err != nil {
return pdpb.Timestamp{}, err
}
forwardStream.Send(request)
err := forwardStream.Send(request)
if err != nil {
s.tsoClientPool.Lock()
delete(s.tsoClientPool.clients, forwardedHost)
s.tsoClientPool.Unlock()
continue
}
ts, err = forwardStream.Recv()
if err != nil {
if strings.Contains(err.Error(), errs.NotLeaderErr) {
Expand Down

0 comments on commit 860ea5c

Please sign in to comment.