Skip to content

Commit

Permalink
cherry pick #3523 to release-4.0
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
  • Loading branch information
nolouch authored and ti-srebot committed Mar 25, 2021
1 parent 5b5bc83 commit 1e22f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func (s *Server) Tso(stream pdpb.PD_TsoServer) error {
if elapsed > slowThreshold {
log.Warn("get timestamp too slow", zap.Duration("cost", elapsed))
}
tsoHandleDuration.Observe(time.Since(start).Seconds())
response := &pdpb.TsoResponse{
Header: s.header(),
Timestamp: &ts,
Expand All @@ -108,7 +109,6 @@ func (s *Server) Tso(stream pdpb.PD_TsoServer) error {
if err := stream.Send(response); err != nil {
return errors.WithStack(err)
}
tsoHandleDuration.Observe(time.Since(start).Seconds())
}
}

Expand Down

0 comments on commit 1e22f01

Please sign in to comment.