Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't invalid region in tryFollowers when set user-defined req timeout and meet DeadLineExceededErr #1170

Closed
crazycs520 opened this issue Feb 22, 2024 · 0 comments · Fixed by #1182

Comments

@crazycs520
Copy link
Contributor

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: true,
		timeout:   time.Second,
		label:     nil,
		accessErr: []RegionErrorType{DeadLineExceededErr, ServerIsBusyErr, ServerIsBusyErr},

2. What did you expect to see?

No backoff.

		expect: &accessPathResult{
			accessPath: []string{
				"{addr: store1, replica-read: false, stale-read: true}",
				"{addr: store2, replica-read: true, stale-read: false}",
				"{addr: store3, replica-read: true, stale-read: false}"},
			regionIsValid:   true,
		},

3. What did you see instead?

		expect: &accessPathResult{
			...
			regionIsValid:   false,
		},

The request has user-defined timeout 1s, the replica selector logic is:

  1. try store1 by stale-read, but got DeadLineExceededErr.
  2. retry store2, got ServerIsBusyErr.
  3. retry store3, got ServerIsBusyErr too, and then invalidate the region in cache.

The expected result is doesn't invalidate region in cache, and the do fast retry without user-defined timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant