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

lightning: merge conflict record tables for preprocess duplicate detection and post-import conflict detection #52307

Merged
merged 12 commits into from Apr 15, 2024

Conversation

lyzx2001
Copy link
Contributor

@lyzx2001 lyzx2001 commented Apr 2, 2024

What problem does this PR solve?

Issue Number: ref #52306
ref #52393

Problem Summary:

What changed and how does it work?

Merge conflict record tables for preprocess duplicate detection and post-import conflict detection.

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

…detection and post-import conflict detection
@ti-chi-bot ti-chi-bot bot added release-note-none do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 2, 2024
Copy link

tiprow bot commented Apr 2, 2024

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

@lyzx2001
Copy link
Contributor Author

lyzx2001 commented Apr 2, 2024

/test pull-lightning-integration-test

Copy link

tiprow bot commented Apr 2, 2024

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

In response to this:

/test pull-lightning-integration-test

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.

@lyzx2001
Copy link
Contributor Author

lyzx2001 commented Apr 2, 2024

/test pull-lightning-integration-test

Copy link

tiprow bot commented Apr 2, 2024

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

In response to this:

/test pull-lightning-integration-test

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 2, 2024

Codecov Report

Merging #52307 (dafc626) into master (27e470a) will increase coverage by 2.2496%.
Report is 84 commits behind head on master.
The diff coverage is 91.4285%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52307        +/-   ##
================================================
+ Coverage   72.1369%   74.3866%   +2.2496%     
================================================
  Files          1467       1493        +26     
  Lines        426605     450483     +23878     
================================================
+ Hits         307740     335099     +27359     
+ Misses        99681      94498      -5183     
- Partials      19184      20886      +1702     
Flag Coverage Δ
integration 50.4226% <80.0000%> (?)
unit 71.1824% <71.4285%> (+0.1637%) ⬆️

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

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

@lyzx2001
Copy link
Contributor Author

lyzx2001 commented Apr 9, 2024

/test pull-lightning-integration-test

Copy link

tiprow bot commented Apr 9, 2024

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

In response to this:

/test pull-lightning-integration-test

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.

@lyzx2001
Copy link
Contributor Author

/test pull-lightning-integration-test

@lyzx2001 lyzx2001 changed the title [WIP] lightning: merge conflict record tables for preprocess duplicate detection and post-import conflict detection lightning: merge conflict record tables for preprocess duplicate detection and post-import conflict detection Apr 10, 2024
Copy link

tiprow bot commented Apr 10, 2024

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

In response to this:

/test pull-lightning-integration-test

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.

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 10, 2024
@lyzx2001
Copy link
Contributor Author

/test pull-lightning-integration-test

Copy link

tiprow bot commented Apr 10, 2024

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

In response to this:

/test pull-lightning-integration-test

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.

@lyzx2001
Copy link
Contributor Author

/test pull-lightning-integration-test

Copy link

tiprow bot commented Apr 11, 2024

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

In response to this:

/test pull-lightning-integration-test

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.

@lyzx2001
Copy link
Contributor Author

/cc @lance6716 @D3Hunter

@ti-chi-bot ti-chi-bot bot requested a review from D3Hunter April 11, 2024 09:26
@lyzx2001
Copy link
Contributor Author

/test pull-lightning-integration-test

Copy link

tiprow bot commented Apr 12, 2024

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

In response to this:

/test pull-lightning-integration-test

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.

pkg/lightning/config/config.go Outdated Show resolved Hide resolved
// due to we use batch insert, we can't know which row is duplicated.
if c.MaxRecordRows >= 0 {
// only warn when it is set by user.
log.L().Warn(`Cannot record duplication (conflict.max-record-rows > 0) when use tikv-importer.backend = \"tidb\" and conflict.strategy = \"replace\".
Copy link
Contributor

Choose a reason for hiding this comment

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

this behaviour also changed. In the old behaviour tidb backend + replace will see error if set max-record-rows, the error will tell the user can't find the error details in conflict table in advance. Now the user will not see the error. Please double check with PM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PM confirmed that the user will no longer see this error. Instead there will be a warning in the log

pkg/lightning/errormanager/errormanager.go Outdated Show resolved Hide resolved
pkg/lightning/errormanager/errormanager.go Show resolved Hide resolved
pkg/lightning/errormanager/errormanager.go Outdated Show resolved Hide resolved
Copy link
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

rest lgtm except existing comments

@lyzx2001
Copy link
Contributor Author

/test pull-lightning-integration-test

Copy link

tiprow bot commented Apr 12, 2024

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

In response to this:

/test pull-lightning-integration-test

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 15, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-15 01:38:20.132286119 +0000 UTC m=+215719.243332568: ☑️ agreed by lance6716.
  • 2024-04-15 02:16:15.473370153 +0000 UTC m=+217994.584416599: ☑️ agreed by D3Hunter.

Copy link

ti-chi-bot bot commented Apr 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BornChanger, D3Hunter, lance6716, 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 the approved label Apr 15, 2024
@ti-chi-bot ti-chi-bot bot merged commit 113b633 into pingcap:master Apr 15, 2024
36 checks passed
@lyzx2001
Copy link
Contributor Author

/label needs-cherry-pick-release-8.1

@ti-chi-bot
Copy link
Member

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

3AceShowHand pushed a commit to 3AceShowHand/tidb that referenced this pull request Apr 16, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Apr 16, 2024
Comment on lines -5 to -7
"(tidb-lightning\\.toml)$":
approvers:
- sig-critical-approvers-tidb-lightning
Copy link
Contributor

Choose a reason for hiding this comment

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

@lyzx2001 you forgot to move this part into lightning/OWNERS.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done
#52745

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.1 release-note-none 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.

None yet

7 participants