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

Fix the issue that leader change with new leader info cause invalidStore state and lead to unnecessary backoff #1115

Merged

Conversation

MyonKeminta
Copy link
Contributor

Fixes #1112

state and lead to unnecessary backoff

Signed-off-by: MyonKeminta <[email protected]>
@MyonKeminta
Copy link
Contributor Author

@crazycs520 @zyguan @cfzjywxk PTAL
@crazycs520 I directly used your test code, if you don't mind 😥

@@ -1008,6 +1009,10 @@ func (s *replicaSelector) proxyReplica() *replica {
return nil
}

func sliceIdentical[T any](a, b []T) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to comment about this function.

Signed-off-by: MyonKeminta <[email protected]>
@cfzjywxk cfzjywxk merged commit b125613 into tikv:master Jan 15, 2024
10 checks passed
@MyonKeminta MyonKeminta deleted the m/fix-leader-change-cause-invalid-store branch January 16, 2024 07:49
@MyonKeminta MyonKeminta changed the title Fix the issue that leader change with nea leader info cause invalidStore state and lead to unnecessary backoff Fix the issue that leader change with new leader info cause invalidStore state and lead to unnecessary backoff May 10, 2024
@crazycs520
Copy link
Contributor

@MyonKeminta Could you cherry-pick this PR to tidb-6.5-with-kv-timeout-feature branch?

MyonKeminta added a commit to MyonKeminta/client-go that referenced this pull request May 11, 2024
…ore state and lead to unnecessary backoff (tikv#1115)

* Fix the issue that leader change with nea leader info cause invalidStore
state and lead to unnecessary backoff

Signed-off-by: MyonKeminta <[email protected]>

* address comments

Signed-off-by: MyonKeminta <[email protected]>

---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
cfzjywxk pushed a commit that referenced this pull request May 14, 2024
…ore state and lead to unnecessary backoff (#1115) (#1337)

* Fix the issue that leader change with nea leader info cause invalidStore state and lead to unnecessary backoff (#1115)

* Fix the issue that leader change with nea leader info cause invalidStore
state and lead to unnecessary backoff

Signed-off-by: MyonKeminta <[email protected]>

* address comments

Signed-off-by: MyonKeminta <[email protected]>

---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>

* Fix build on go1.18

Signed-off-by: MyonKeminta <[email protected]>

---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
mittalrishabh pushed a commit to mittalrishabh/client-go that referenced this pull request Jan 8, 2025
…ore state and lead to unnecessary backoff (tikv#1115) (tikv#1337)

* Fix the issue that leader change with nea leader info cause invalidStore state and lead to unnecessary backoff (tikv#1115)

* Fix the issue that leader change with nea leader info cause invalidStore
state and lead to unnecessary backoff

Signed-off-by: MyonKeminta <[email protected]>

* address comments

Signed-off-by: MyonKeminta <[email protected]>

---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>

* Fix build on go1.18

Signed-off-by: MyonKeminta <[email protected]>

---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
mittalrishabh added a commit to mittalrishabh/client-go that referenced this pull request Jan 8, 2025
…nvalidStore state and lead to unnecessary backoff (tikv#1115) (tikv#1337)" (tikv#4)

This reverts commit 9e1b9eb.

Co-authored-by: rishabh_mittal <[email protected]>
mittalrishabh pushed a commit to mittalrishabh/client-go that referenced this pull request Jan 8, 2025
… cause invalidStore state and lead to unnecessary backoff (tikv#1115) (tikv#1337)" (tikv#4)"

This reverts commit db6b95b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NotLeader error may cause unnecessary backoff by causing pseudo region error
4 participants