-
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
executor: initialize expensive query handler on domain creation #21340
executor: initialize expensive query handler on domain creation #21340
Conversation
No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md |
/rebuild |
No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md |
/rebuild |
session/bootstrap_test.go
Outdated
@@ -388,19 +388,6 @@ func (s *testBootstrapSuite) TestOldPasswordUpgrade(c *C) { | |||
c.Assert(newpwd, Equals, "*0D3CED9BEC10A777AEC23CCC353A8C08A633045E") | |||
} | |||
|
|||
func (s *testBootstrapSuite) TestBootstrapInitExpensiveQueryHandle(c *C) { |
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.
why remove this test
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.
The InitExpensiveQueryHandle
function is removed so I don't see the point testing against it. But maybe instead of removing the test, I could just remove InitExpensiveQueryHandle
invocation and just check the existence of that query handler to avoid regression. Let me add that.
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.
Done
/assign xiongjiwei |
@XuHuaiyu PTAL . |
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 |
1 similar comment
/run-all-tests |
Hi @xiongjiwei @XuHuaiyu PTAL, thanks |
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
[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 writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 661d80eed0aa5034e2fef1a3f687759b7c96cea1
|
Signed-off-by: Hanlin Shi <[email protected]>
As query handler is being initialized during domain init, not need for duplicated handler initialization. Signed-off-by: Hanlin Shi <[email protected]>
Added expensive query handler existence check back to avoid potential regression. Signed-off-by: Hanlin Shi <[email protected]>
600971a
to
e300469
Compare
Are you changing anything? |
No change just rebase. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: e300469
|
Bot will automatically merge the master branch. And the merge of PR will squash/rebase the commit history into the linear one. So you don't need to rebase unless there is a conflict or so. |
Got that, thanks! |
/run-all-tests |
If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. |
You can only trigger the failed test by |
@hanlins: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #18401
Problem Summary:
What is changed and how it works?
What's Changed:
Merge the expensive query handler initialization logic into the
NewDomain
function.How it Works:
Originally the query execution handler is not initialized, thus
LogOnQueryExceedMemQuota
is a closure that accesses nil pointer. Now initialize query execution handler onDomain
creation, so it won't access the nil pointer during bootstrap.Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
NA
NA
Release note