-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress.Indicates that a PR should not merge because it is a work in progress.
Description
In client/client.go, when tsLoop starts, it will first initialize the tso stream as following:
for {
var err error
if stream == nil {
var ctx context.Context
ctx, cancel = context.WithCancel(loopCtx)
stream, err = c.leaderClient().Tso(ctx)
if err != nil {
select {
case <-loopCtx.Done():
cancel()
return
default:
}
log.Error("[pd] create tso stream error", zap.Error(err))
c.ScheduleCheckLeader()
cancel()
c.revokeTSORequest(errors.WithStack(err))
select {
case <-time.After(time.Second):
case <-loopCtx.Done():
return
}
continue
}
}
...
}
But if at that time the server crash, it will block until TCP layer timeout.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress.Indicates that a PR should not merge because it is a work in progress.