-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
server: openSession instead set nil when changeUser #33894
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
ed4d896
to
c9e04b5
Compare
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/a5b87a3bc3f924d85c66dca2d88314257566e7c5 |
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
server/conn.go
Outdated
@@ -2341,7 +2341,11 @@ func (cc *clientConn) handleChangeUser(ctx context.Context, data []byte) error { | |||
if err := cc.ctx.Close(); err != nil { | |||
logutil.Logger(ctx).Debug("close old context failed", zap.Error(err)) | |||
} | |||
cc.ctx = nil | |||
// new openSession here, openSessionAndDoAuth will not run again because ctx was not nil. |
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.
// new openSession here, openSessionAndDoAuth will not run again because ctx was not nil. | |
// openSession explicitly to renew session, it won't run again in openSessionAndDoAuth because ctx is not nil. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 77601b2
|
cherry pick to release-5.4 in PR #34427 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.3 in PR #35405 |
What problem does this PR solve?
Issue Number:
close #33892
Problem Summary:
What is changed and how it works?
Check List
Tests
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.