-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
topsql: fix the issue of TiDB doesn't set the request tag for DDL before send RPC request to TiKV #33133
Conversation
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
[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. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/97c97ca59652d30f55016a678534ba74c16aa15b |
Signed-off-by: crazycs520 <[email protected]>
…nto topsql-ddl-tag
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
/run-all-tests |
sqlDigests map[stmtstats.BinaryDigest]struct{} | ||
} | ||
|
||
func (c *resourceTagChecker) checkExist(t *testing.T, digest stmtstats.BinaryDigest, sqlStr string) { |
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.
How about checkExist for all requests happened in the test suite? In this way, when there are new kind of requests, it will be caught.
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.
I have a similar thought: require all requests to contain tags.
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.
Not all RPC requests are caused by SQL. So I can't check the all request. But maybe I can check the ALL cop
kind RPC request, since as I know, cop
kind request must cause by SQL.
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.
Instead of using white allow list that only checks cop requests, maybe we can use black block lists to check all requests except for some kinds. In this way, when there are new kind of RPC requests, people must review, check and change the test case in order to pass CI. Is this possible?
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.
I will refine this test in this issue later. #33208
This PR should not close #33132 since it does not fully resolve the issue. |
Great, I already changed the issue description. |
@crazycs520 This is a nice workaround. Just remember to also fix remaining problems. You may like to open new issues to track them. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 80ccb7d
|
/merge |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.4 in PR #33210 |
cherry pick to release-6.0 failed |
What problem does this PR solve?
Issue Number: close #33132
Problem Summary: This PR fix the issue of TiDB doesn't set the request tag for DDL before send rpc to TiKV.
What is changed and how it works?
Set the DDL request tag.
Other problem: After this PR, TopSQL still doesn't contain the
scan_row
/scan_index
data , I will fix this in next PR.Check List
Tests
TiDB:
TiKV:
Release note