-
Notifications
You must be signed in to change notification settings - Fork 1.1k
CallCommandOnLeader frequently received EpochNotMatch #415
Copy link
Copy link
Open
Description
if CallCommandOnLeader request with stale region epoch (maybe split happend), client will receive EpochNotMatch, and it will retry with wrong region until timeout.
if resp.Header.Error != nil {
err := resp.Header.Error
if err.GetStaleCommand() != nil || err.GetEpochNotMatch() != nil || err.GetNotLeader() != nil {
log.Debugf("encouter retryable err %+v", resp)
// fixme: maybe region splited when requesting, resp will be EpochNotMatch until timeout
if err.GetNotLeader() != nil && err.GetNotLeader().Leader != nil {
leader = err.GetNotLeader().Leader
log.Debugf("retry on leader peer=%d,%d", leader.Id, leader.StoreId)
} else {
leader = c.LeaderOfRegion(regionID)
}
continue
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels