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

test: add unique check for mock backend ctx #52900

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tangenta
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #52874

Problem Summary:

[2024/04/26 11:00:14.826 +08:00] [INFO] [mock.go:211] ["mock writer write row"] [key=7480000000000000685f698000000000000002016475706c69636174ff6576616c75650000fd] [idxVal=007d017f001c038000000000000000016475706c69636174ff6576616c75650000fd80000100000002010000]
[2024/04/26 11:00:14.826 +08:00] [INFO] [mock.go:211] ["mock writer write row"] [key=7480000000000000685f698000000000000002016475706c69636174ff6576616c75650000fd] [idxVal=007d017f001c038000000000000001016475706c69636174ff6576616c75650000fd80000100000002010000]

During the backfill step, writing to the same key for unique index should report "key exists" error.

What changed and how does it work?

Add unique check for mock backend ctx.

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 26, 2024
Copy link

tiprow bot commented Apr 26, 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 Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.7528%. Comparing base (1d698c7) to head (a9e3219).
Report is 6 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52900         +/-   ##
=================================================
- Coverage   72.3811%   55.7528%   -16.6284%     
=================================================
  Files          1482       1596        +114     
  Lines        428743     599021     +170278     
=================================================
+ Hits         310329     333971      +23642     
- Misses        99115     241962     +142847     
- Partials      19299      23088       +3789     
Flag Coverage Δ
integration 37.0829% <38.0952%> (?)
unit 71.2341% <100.0000%> (+0.0156%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 49.8177% <ø> (+8.6738%) ⬆️

@tangenta
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Apr 26, 2024

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

@ywqzzy ywqzzy self-requested a review April 26, 2024 06:29
Copy link

ti-chi-bot bot commented Apr 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, ywqzzy

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

Copy link

ti-chi-bot bot commented Apr 26, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-26 06:56:27.130074908 +0000 UTC m=+329743.869977820: ☑️ agreed by ywqzzy.
  • 2024-04-26 07:17:35.01496568 +0000 UTC m=+331011.754868594: ☑️ agreed by lance6716.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 26, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 29, 2024
@lance6716
Copy link
Contributor

/retest

Copy link

tiprow bot commented Apr 29, 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/test-infra repository.

@tangenta
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Apr 29, 2024

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

Copy link

ti-chi-bot bot commented Apr 29, 2024

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

Test name Commit Details Required Rerun command
pull-mysql-client-test a9e3219 link unknown /test pull-mysql-client-test
idc-jenkins-ci-tidb/unit-test a9e3219 link unknown /test unit-test

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/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none 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.

data inconsistency during adding unique index
3 participants