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

puller(ticdc): always split update kv entries in sink safe mode #11224

Merged
merged 14 commits into from
Oct 12, 2024

Conversation

lidezhu
Copy link
Collaborator

@lidezhu lidezhu commented Jun 3, 2024

What problem does this PR solve?

Issue Number: close #11231

What is changed and how it works?

After introduce #10919, we choose to just split some update kv entries in puller module when changefeed starts and avoid split any update events in sink module.
This makes it possible to meet duplicate entry error during normal run and cause changefeed to restart.
Although after restart, puller can split the conflict update events and changefeed can continue to run normally. Some customer may be unhappy with this behavior if their workload has many conflict data which cause changefeed restart occasionally. So we need a workaround to avoid restart.

This pr introduce a type PullerSplitUpdateMode to describe how puller handle update kv entries. We keep all split logic unchanged as in #10919, and introduce a new behaviour:
When mysql sink is in safe mode, we set PullerSplitUpdateMode to PullerSplitUpdateModeAlways. This means to split all update kv entries in puller. So if the customer don't want changefeed to restart, they can config safe-mode to true to avoid the restart.

Check List

Tests

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

Questions

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

Release note

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jun 3, 2024
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 37.80488% with 51 lines in your changes missing coverage. Please review.

Project coverage is 55.6355%. Comparing base (c2cb322) to head (bdfa2ce).
Report is 2 commits behind head on master.

Additional details and impacted files
Components Coverage Δ
cdc 59.8906% <37.8048%> (+0.0142%) ⬆️
dm 51.0700% <ø> (+0.9843%) ⬆️
engine 53.2994% <ø> (+0.0628%) ⬆️
Flag Coverage Δ
unit 55.6355% <37.8048%> (+0.3571%) ⬆️

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

@@               Coverage Diff                @@
##             master     #11224        +/-   ##
================================================
+ Coverage   55.2784%   55.6355%   +0.3571%     
================================================
  Files          1001       1001                
  Lines        136158     137306      +1148     
================================================
+ Hits          75266      76391      +1125     
+ Misses        55407      55383        -24     
- Partials       5485       5532        +47     

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jun 3, 2024

/test dm-integration-test

5 similar comments
@lidezhu
Copy link
Collaborator Author

lidezhu commented Jun 3, 2024

/test dm-integration-test

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jun 4, 2024

/test dm-integration-test

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jun 4, 2024

/test dm-integration-test

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jun 4, 2024

/test dm-integration-test

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jun 4, 2024

/test dm-integration-test

@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 Jun 13, 2024
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 13, 2024
@ti-chi-bot ti-chi-bot bot added the approved label Jul 2, 2024
@lidezhu
Copy link
Collaborator Author

lidezhu commented Oct 11, 2024

/retest

Copy link
Contributor

ti-chi-bot bot commented Oct 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asddongmen, CharlesCheung96

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 [CharlesCheung96,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 Oct 12, 2024
Copy link
Contributor

ti-chi-bot bot commented Oct 12, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-02 19:11:49.070571518 +0000 UTC m=+1351635.556060347: ☑️ agreed by CharlesCheung96.
  • 2024-10-12 02:08:30.196552304 +0000 UTC m=+64107.345462135: ☑️ agreed by asddongmen.

@lidezhu lidezhu added 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. labels Oct 12, 2024
@ti-chi-bot ti-chi-bot bot merged commit f1d2ee6 into pingcap:master Oct 12, 2024
28 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Oct 12, 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: #11654.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Oct 12, 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: #11655.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Oct 12, 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: #11656.

@ti-chi-bot
Copy link
Member

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

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-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.

puller(ticdc): should split all update kv entries in puller when sink module is in safe mode
4 participants