Open
Description
Issue
1. Minimal reproduce step
In the following case, suppose the region leader is in store1
.
ca = replicaSelectorAccessPathCase{
reqType: tikvrpc.CmdGet,
readType: kv.ReplicaReadMixed,
staleRead: false,
timeout: time.Second,
label: nil,
accessErr: []RegionErrorType{ServerIsBusyErr, ServerIsBusyErr, DeadLineExceededErr},
2. What did you expect to see?
expect: &accessPathResult{
accessPath: []string{
"{addr: store1, replica-read: true, stale-read: false}",
"{addr: store2, replica-read: true, stale-read: false}",
"{addr: store3, replica-read: true, stale-read: false}"},
respErr: "",
respRegionError: fakeEpochNotMatch,
backoffCnt: 0,
backoffDetail: []string{},
regionIsValid: true,
},
3. What did you see instead?
expect: &accessPathResult{
accessPath: []string{
"{addr: store1, replica-read: true, stale-read: false}",
"{addr: store2, replica-read: true, stale-read: false}",
"{addr: store3, replica-read: true, stale-read: false}"},
respErr: "",
respRegionError: fakeEpochNotMatch,
backoffCnt: 0,
backoffDetail: []string{},
regionIsValid: false, // should be true ?
},
When user sets tidb_kv_read_timeout
and meet DeadLineExceededErr
at first round, we needn't invalidate the region cache.
Metadata
Metadata
Assignees
Labels
No labels