Skip to content
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

Merged
merged 6 commits into from
Nov 1, 2024

Conversation

Defined2014
Copy link
Contributor

@Defined2014 Defined2014 commented Oct 31, 2024

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

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 31, 2024
Copy link

tiprow bot commented Oct 31, 2024

Hi @Defined2014. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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.

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 87.09677% with 4 lines in your changes missing coverage. Please review.

Project coverage is 57.6117%. Comparing base (44f1c14) to head (dae202a).
Report is 78 commits behind head on master.

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     
Flag Coverage Δ
integration 39.5161% <45.1612%> (?)
unit 72.5378% <83.8709%> (+0.0427%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 62.9986% <ø> (+16.9787%) ⬆️

@Defined2014 Defined2014 requested a review from tangenta October 31, 2024 07:22
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 1, 2024
@Defined2014 Defined2014 requested a review from mjonss November 1, 2024 01:47
@Defined2014 Defined2014 added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Nov 1, 2024
Copy link
Contributor

@mjonss mjonss left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

@Defined2014 Defined2014 Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could both used.

pkg/tablecodec/tablecodec.go Show resolved Hide resolved
@@ -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 {
Copy link
Contributor

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:?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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
Copy link
Contributor Author

@Defined2014 Defined2014 Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could both used.

pkg/tablecodec/tablecodec.go Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Nov 1, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 1, 2024
Copy link

ti-chi-bot bot commented Nov 1, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-01 01:45:49.182786635 +0000 UTC m=+573462.021942182: ☑️ agreed by tangenta.
  • 2024-11-01 10:54:59.595414321 +0000 UTC m=+606412.434569866: ☑️ agreed by mjonss.

Copy link

tiprow bot commented Nov 1, 2024

@Defined2014: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow dae202a link true /test fast_test_tiprow

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.

@Defined2014
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Nov 1, 2024

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@ti-chi-bot ti-chi-bot bot merged commit 5da9d1a into pingcap:master Nov 1, 2024
25 of 26 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #57075.

@Defined2014 Defined2014 deleted the fix-56535-2 branch November 1, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unexpected assertion failed using global index
4 participants