-
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
*: let TempIndex support encode/decode partitionID flag #57017
Conversation
Hi @Defined2014. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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 kubernetes-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #57017 +/- ##
=================================================
- Coverage 73.3610% 57.6117% -15.7494%
=================================================
Files 1634 1803 +169
Lines 452548 652633 +200085
=================================================
+ Hits 331994 375993 +43999
- Misses 100190 251205 +151015
- Partials 20364 25435 +5071
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Can you explain the issue a bit more technical? Is it only on delete (part of update) that the TempIndex would fail?
@@ -683,9 +683,9 @@ func (m *MemAwareHandleMap[V]) Range(fn func(h Handle, val V) bool) { | |||
return |
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.
Curious question: In this function is m.ints
and m.strs
empty if m.partitionInts
and m.partitionStrs
is used and vice versa? Or can both pair of maps be used at the same time?
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.
Could both used.
@@ -1415,6 +1438,16 @@ func (v *TempIndexValueElem) DecodeOne(b []byte) (remain []byte, err error) { | |||
v.Handle, _ = kv.NewCommonHandle(b[:hLen]) | |||
} | |||
b = b[hLen:] | |||
if b[0] == TempIndexKeyTypePartitionIDFlag { |
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.
Is this only needed here, and not also in case TempIndexValueFlagNormal:
?
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.
Yes, only delete will include handle. https://github.com/pingcap/tidb/pull/57017/files#diff-d38a794eb5c0ced0fe2e07bc0af6bd8624e360f4c5055b6c7075d62afac48569R1310
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.
@@ -683,9 +683,9 @@ func (m *MemAwareHandleMap[V]) Range(fn func(h Handle, val V) bool) { | |||
return |
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.
Could both used.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mjonss, tangenta 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 |
@Defined2014: The following test failed, say
Full PR test history. Your PR dashboard. 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/retest |
@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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 kubernetes-sigs/prow repository. |
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #56535
Problem Summary: TempIndex didn't process partition handle before. So let it supports encode/decode partition handle.
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.