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

sink(ticdc): fix csv update #9723

Merged
merged 5 commits into from
Sep 12, 2023

Conversation

CharlesCheung96
Copy link
Contributor

@CharlesCheung96 CharlesCheung96 commented Sep 11, 2023

What problem does this PR solve?

Issue Number: ref #9658

What is changed and how it works?

  1. Remove old value and do not split event in sinkManager.
  2. Add Scheme() to EventSink interface to support scheme-based split strategy in TableEvent.
  3. Implement scheme-based split strategy for SingleTableTxn.
  4. Add csv update test to cover the changes.
  5. With enableOldValue=true, the behavior changes for canal-json and open protocols are as follows:
    • Before this pr: If a transaction contains only one update event, it will definitely not be split.
    • Aefore this pr: If a transaction contains only one update event and it updates the unique key field, it will be split into delete + insert events.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

`Fix the issue that update events could be converted to insert events in kafka sink`.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 11, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/cherry-pick-not-approved release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 11, 2023
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 11, 2023
@CharlesCheung96
Copy link
Contributor Author

/test all

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 11, 2023
cdc/model/sink.go Outdated Show resolved Hide resolved
@CharlesCheung96 CharlesCheung96 marked this pull request as ready for review September 11, 2023 15:48
@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 Sep 11, 2023
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 12, 2023
@CharlesCheung96
Copy link
Contributor Author

/test all

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Sep 12, 2023
@CharlesCheung96
Copy link
Contributor Author

/test all

@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Sep 12, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3AceShowHand, asddongmen

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 [3AceShowHand,asddongmen]

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 Sep 12, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 12, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-09-12 03:58:24.352596155 +0000 UTC m=+328086.277152550: ☑️ agreed by 3AceShowHand.
  • 2023-09-12 07:45:55.860391802 +0000 UTC m=+341737.784948197: ☑️ agreed by asddongmen.

@CharlesCheung96
Copy link
Contributor Author

/retest

@CharlesCheung96
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit d3b230c into pingcap:release-6.5 Sep 12, 2023
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants