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

*: improve ErrKeyExists generation and MemoizeStr #54412

Merged
merged 5 commits into from
Jul 4, 2024

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Jul 3, 2024

What problem does this PR solve?

Issue Number: ref #53004

Problem Summary:

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 do-not-merge/needs-tests-checked 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. and removed do-not-merge/needs-tests-checked labels Jul 3, 2024
Copy link

tiprow bot commented Jul 3, 2024

Hi @lance6716. 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.

Signed-off-by: lance6716 <[email protected]>
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 24 lines in your changes missing coverage. Please review.

Project coverage is 56.2697%. Comparing base (634ac69) to head (28bdd75).
Report is 1 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54412         +/-   ##
=================================================
- Coverage   72.8354%   56.2697%   -16.5658%     
=================================================
  Files          1535       1652        +117     
  Lines        435896     603962     +168066     
=================================================
+ Hits         317487     339848      +22361     
- Misses        98795     240821     +142026     
- Partials      19614      23293       +3679     
Flag Coverage Δ
integration 36.8804% <61.1111%> (?)
unit 71.8279% <66.6666%> (-0.0095%) ⬇️

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

Components Coverage Δ
dumpling 52.9656% <ø> (ø)
parser ∅ <ø> (∅)
br 52.6050% <ø> (+6.5407%) ⬆️

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 3, 2024
@@ -1165,11 +1165,11 @@ func (t *TableCommon) addIndices(sctx table.MutateContext, recordID kv.Handle, r
if !skipCheck && v.Meta().Unique {
// Make error message consistent with MySQL.
tablecodec.TruncateIndexValues(t.meta, v.Meta(), indexVals)
entryKey, err := genIndexKeyStr(indexVals)
entryKey, err := genIndexKeyStrs(indexVals)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
entryKey, err := genIndexKeyStrs(indexVals)
colStrVals, err := genIndexKeyStrs(indexVals)

Copy link
Contributor

Choose a reason for hiding this comment

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

there are a few in below code, can change them together

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

ti-chi-bot bot commented Jul 4, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-03 11:39:05.346598349 +0000 UTC m=+1410871.832087181: ☑️ agreed by hawkingrei.
  • 2024-07-04 02:30:33.945083298 +0000 UTC m=+1464360.430572133: ☑️ agreed by D3Hunter.

@Benjamin2037
Copy link
Collaborator

Benjamin2037 commented Jul 4, 2024

/approve

Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Jul 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, D3Hunter, hawkingrei

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 the approved label Jul 4, 2024
@ti-chi-bot ti-chi-bot bot merged commit eaa6032 into pingcap:master Jul 4, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.

4 participants