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

server: fix decode issue for prefetch point plan index keys #50037

Merged
merged 5 commits into from
Jan 3, 2024

Conversation

tangenta
Copy link
Contributor

@tangenta tangenta commented Jan 3, 2024

What problem does this PR solve?

Issue Number: close #50012

Problem Summary:

The second parameter of tablecodec.DecodeHandleInUniqueIndexValue indicates whether index KVs belong to a clustered-index table. Previously, it was always false, causing decoding error and panic.

What changed and how does it work?

  • Set the parameter properly.
  • In order to pass the check like BatchGet req does not set the resource tag, tid: 123, stack: goroutine 20153 [running], I also set the resource group tagger by the digest of all SQLs.
  • Add an integration test.

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 do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 3, 2024
Copy link

tiprow bot commented Jan 3, 2024

Hi @tangenta. 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/test-infra repository.

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Merging #50037 (f7cce54) into master (33480e8) will decrease coverage by 3.1350%.
Report is 12 commits behind head on master.
The diff coverage is 8.6956%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #50037        +/-   ##
================================================
- Coverage   71.9599%   68.8249%   -3.1350%     
================================================
  Files          1438       1440         +2     
  Lines        345794     409173     +63379     
================================================
+ Hits         248833     281613     +32780     
- Misses        76727     108521     +31794     
+ Partials      20234      19039      -1195     
Flag Coverage Δ
integration 43.8584% <8.6956%> (?)
unit 71.9596% <ø> (-0.0003%) ⬇️

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

Components Coverage Δ
dumpling 56.3129% <ø> (ø)
parser ∅ <ø> (∅)
br 44.1286% <ø> (-7.4728%) ⬇️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 3, 2024
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 3, 2024
@crazycs520
Copy link
Contributor

@mornyx PTAL

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 3, 2024
@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/needs-triage-completed labels Jan 3, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 3, 2024
Copy link

ti-chi-bot bot commented Jan 3, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-03 10:08:15.768616363 +0000 UTC m=+2251586.805843287: ☑️ agreed by lance6716.
  • 2024-01-03 12:21:13.086277546 +0000 UTC m=+2259564.123504471: ☑️ agreed by Defined2014.

@Defined2014
Copy link
Contributor

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 3, 2024
Copy link

ti-chi-bot bot commented Jan 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: crazycs520, Defined2014, lance6716

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:
  • OWNERS [Defined2014,crazycs520,lance6716]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tangenta
Copy link
Contributor Author

tangenta commented Jan 3, 2024

/unhold cc @Defined2014

@tangenta
Copy link
Contributor Author

tangenta commented Jan 3, 2024

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 3, 2024
@ti-chi-bot ti-chi-bot bot merged commit 4f38f29 into pingcap:master Jan 3, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 3, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 3, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 3, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
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-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-statements prefetchPointPlanKeys panic
5 participants