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

executor: fix data inconsistency after load data ... replace into ... #56415

Merged
merged 6 commits into from
Oct 8, 2024

Conversation

fzzf678
Copy link
Contributor

@fzzf678 fzzf678 commented Sep 29, 2024

What problem does this PR solve?

Issue Number: close #56408

Problem Summary:

What changed and how does it work?

The reason is the bool flag returned by removeRow was not rightly handled in handleDuplicateKey.

// removeRow removes the duplicate row and cleanup its keys in the key-value map.
// But if the to-be-removed row equals to the to-be-added row, no remove or add
// things to do and return (true, nil).

If we load a existed row, removeRow will return (true, nil), handleDuplicateKey should also return (true, nil)

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.

Fix data inconsistency after load data ... replace into ...

@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 29, 2024
Copy link

tiprow bot commented Sep 29, 2024

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

@fzzf678 fzzf678 changed the title fix data inconsistency after load data ... replace into ... executor: fix data inconsistency after load data ... replace into ... Sep 29, 2024
Copy link

codecov bot commented Sep 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.8255%. Comparing base (3922a4b) to head (539bd2c).
Report is 195 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56415        +/-   ##
================================================
+ Coverage   73.3869%   75.8255%   +2.4385%     
================================================
  Files          1623       1624         +1     
  Lines        447156     456998      +9842     
================================================
+ Hits         328154     346521     +18367     
+ Misses        98887      90077      -8810     
- Partials      20115      20400       +285     
Flag Coverage Δ
integration 49.7844% <0.0000%> (?)
unit 72.9596% <100.0000%> (+0.4788%) ⬆️

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

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

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 30, 2024
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. labels Sep 30, 2024
Copy link

ti-chi-bot bot commented Oct 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CbcWestwolf, 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 [CbcWestwolf,lance6716]

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 Oct 8, 2024
Copy link

ti-chi-bot bot commented Oct 8, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-30 02:32:15.340056356 +0000 UTC m=+235690.760269367: ☑️ agreed by lance6716.
  • 2024-10-08 02:10:33.430236903 +0000 UTC m=+925588.850449915: ☑️ agreed by CbcWestwolf.

@lance6716
Copy link
Contributor

/retest

Copy link

tiprow bot commented Oct 8, 2024

@lance6716: 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 7daf026 into pingcap:master Oct 8, 2024
23 checks passed
@fzzf678 fzzf678 added the needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. label Oct 9, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Oct 9, 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-6.5: #56505.

@fzzf678 fzzf678 added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Oct 9, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Oct 9, 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: #56508.

@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Oct 28, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Oct 28, 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: #56876.

@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Oct 30, 2024
@ti-chi-bot
Copy link
Member

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

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. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data inconsistency in non clustered PK after load data ...replace into ...
4 participants