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 data loss #9618

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Conversation

CharlesCheung96
Copy link
Contributor

@CharlesCheung96 CharlesCheung96 commented Aug 21, 2023

What problem does this PR solve?

Issue Number: close #9592

What is changed and how it works?

Before this pr, asyncCloseAndClearTableSink always returns true, no matter whether the underlying table sink successfully closed. During two-phase scheduling, this error can cause the new node's table sink to write data downstream before the old node's table sink actually exits. And this problem is more likely to be repeated in batch write scenarios (such as storage sink).

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

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `None`.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 21, 2023
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. 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. and removed do-not-merge/needs-triage-completed labels Aug 21, 2023
Copy link
Contributor

@nongfushanquan nongfushanquan left a comment

Choose a reason for hiding this comment

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

Please add comments about the reason for the data loss.

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 21, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Aug 21, 2023
@ti-chi-bot ti-chi-bot bot added the lgtm label Aug 21, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hicqu, nongfushanquan

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 21, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 21, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-21 08:32:55.091809147 +0000 UTC m=+1138339.640825118: ☑️ agreed by hicqu.
  • 2023-08-21 09:28:23.245373878 +0000 UTC m=+1141667.794389862: ☑️ agreed by nongfushanquan.

@CharlesCheung96
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 0694352 into pingcap:master Aug 22, 2023
3 checks passed
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Aug 22, 2023
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: #9628.

ti-chi-bot bot pushed a commit that referenced this pull request Aug 23, 2023
3AceShowHand pushed a commit to 3AceShowHand/tiflow that referenced this pull request Aug 29, 2023
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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 seen when running storage sink and restarting PD/TiCDC/TiKV
4 participants