-
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
TopSQL: add table id in resource tag #55555
Conversation
6171494
to
cff6f74
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #55555 +/- ##
=================================================
- Coverage 72.8605% 57.1252% -15.7353%
=================================================
Files 1605 1755 +150
Lines 446214 631878 +185664
=================================================
+ Hits 325114 360962 +35848
- Misses 101062 246321 +145259
- Partials 20038 24595 +4557
Flags with carried forward coverage won't be shown. Click here to find out more.
|
6a4eb54
to
291022e
Compare
37ba9b4
to
c70e529
Compare
Signed-off-by: nolouch <nolouch@gmail.com>
tag.PlanDigest = b.planDigest.Bytes() | ||
} | ||
if len(key) > 0 { | ||
tag.TableId = decodeTableID(key) |
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.
Do we need to consider any error cases here?
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.
If the decoded fails, it will be tagged as 0.
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've no idea, do we need to distinguish real '0' with the error '0'?
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 think no need, and the real table_id
must be greater than 0, https://github.com/pingcap/tidb/blob/master/pkg/meta/meta.go#L253-L254
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.
Got it
@@ -125,6 +125,12 @@ func GetFirstKeyFromRequest(req *tikvrpc.Request) (firstKey []byte) { | |||
} | |||
} | |||
} | |||
case *kvrpcpb.PessimisticLockRequest: |
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 add this new case?
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 just think it was missing, so I added it.
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
/retest-required |
PTAL @XuHuaiyu |
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: crazycs520, tangenta, XuHuaiyu, yibin87 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: ref #55540
Problem Summary:
*: add table id in resource tag
What changed and how does it work?
Check List
Tests
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.