-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
tikv: fix panic when recycle non-superbatch idle conn #16299
tikv: fix panic when recycle non-superbatch idle conn #16299
Conversation
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #16299 +/- ##
===========================================
Coverage 80.4598% 80.4598%
===========================================
Files 506 506
Lines 136135 136135
===========================================
Hits 109534 109534
Misses 18106 18106
Partials 8495 8495 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
@lysu merge failed. |
cherry pick to release-4.0 in PR #16303 |
What problem does this PR solve?
Problem Summary:
tidb-tikv will use superbatch conn as default, but "cluster table" will establish non-superbatch connection between tidb-tidb.
tidb/store/tikv/client.go
Line 322 in af0a49c
and superbatch due use streaming, it has recycle idle conn logic to avoid goroutine leak.
but "recycle idle conn logic" doesn't work well when conns map mix superbatch and non-superbatch conn, and will meet segv fault.
What is changed and how it works?
What's Changed:
only recycle superbatch conns
How it Works:
only recycle superbatch conns
Related changes
Check List
Tests
Side effects
Release note
This change is