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

TiCDC support checking if data is entirely replicated to Downstream (#10133) #10336

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #10133

What problem does this PR solve?

Issue Number: close #10289

What is changed and how it works?

  1. Add a new item in tableSink called lastSyncedTs to record the latest commitTs received by sink module
  2. Adjust the schedule part to pass all lastSyncedTs from tables and do aggregate at changefeed level to obtain a changefeed level lastSyncedTs
  3. Add a new http api called api/v2/changefeeds/<changefeed-id>/synced to get the changefeed synced status.
  4. Add related ut and ft for synced status calculation

Check List

Tests

  • Unit test

  • Integration test
    For integration test, I add the test for both normal cases and failure cases, such as tikv failed etc.

  • Manual test (add detailed scripts or steps below)

    The http api looks like it:
    image

    For performance test, we do pressure test on master and ours cdc and get the same sink output, which shows the PR have no impact on the performance.

  • 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

TiCDC support checking if data is entirely replicated to Downstream

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added 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. type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR. labels Dec 21, 2023
@hongyunyan
Copy link
Collaborator

/cherry-pick-invite

@ti-chi-bot
Copy link
Member Author

@hongyunyan Please accept the invitation then you can push to the cherry-pick pull requests.
Comment with "/cherry-pick-invite" if the invitation is expired.
https://github.com/ti-chi-bot/tiflow/invitations

@hongyunyan
Copy link
Collaborator

/test verify

@hongyunyan
Copy link
Collaborator

/retest

@hongyunyan
Copy link
Collaborator

/run-pull-cdc-integration-mysql-test

@hongyunyan
Copy link
Collaborator

/retest

@hongyunyan
Copy link
Collaborator

/retest

@hongyunyan
Copy link
Collaborator

/test cdc-integration-mysql-test

@hongyunyan
Copy link
Collaborator

/retest

1 similar comment
@hongyunyan
Copy link
Collaborator

/retest

@hongyunyan
Copy link
Collaborator

/run-pull-cdc-integration-mysql-test

SinkCheckpointTs: model.JSONTime(oracle.GetTimeFromTS(status.CheckpointTs)),
PullerResolvedTs: model.JSONTime(oracle.GetTimeFromTS(status.PullerResolvedTs)),
LastSyncedTs: model.JSONTime(oracle.GetTimeFromTS(status.LastSyncedTs)),
NowTs: model.JSONTime(time.Unix(0, 0)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use the local time here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Because now_ts should be the time from pd, not locally. Here we can't get pd time, so we don't provider other local time, which may be misleading.

Copy link
Contributor

ti-chi-bot bot commented Jan 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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:

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 Jan 19, 2024
@CharlesCheung96
Copy link
Contributor

/retest

1 similar comment
@hongyunyan
Copy link
Collaborator

/retest

@hongyunyan
Copy link
Collaborator

/retest

@hongyunyan
Copy link
Collaborator

/test pull-cdc-integration-mysql-test

Copy link
Contributor

ti-chi-bot bot commented Jan 19, 2024

@hongyunyan: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test cdc-integration-kafka-test
  • /test cdc-integration-mysql-test
  • /test dm-compatibility-test
  • /test dm-integration-test
  • /test verify

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tiflow/release-6.5/ghpr_verify
  • pingcap/tiflow/release-6.5/pull_cdc_integration_test
  • pingcap/tiflow/release-6.5/pull_dm_compatibility_test
  • pingcap/tiflow/release-6.5/pull_dm_integration_test

In response to this:

/test pull-cdc-integration-mysql-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.

@hongyunyan
Copy link
Collaborator

/test cdc-integration-mysql-test

2 similar comments
@hongyunyan
Copy link
Collaborator

/test cdc-integration-mysql-test

@hongyunyan
Copy link
Collaborator

/test cdc-integration-mysql-test

@hongyunyan
Copy link
Collaborator

/retest

1 similar comment
@hongyunyan
Copy link
Collaborator

/retest

@hongyunyan
Copy link
Collaborator

/rebuild

@hongyunyan
Copy link
Collaborator

/build

@hongyunyan
Copy link
Collaborator

/test verify

3 similar comments
@hongyunyan
Copy link
Collaborator

/test verify

@hongyunyan
Copy link
Collaborator

/test verify

@hongyunyan
Copy link
Collaborator

/test verify

@hongyunyan
Copy link
Collaborator

/test verify

1 similar comment
@hongyunyan
Copy link
Collaborator

/test verify

@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Jan 22, 2024
@ti-chi-bot ti-chi-bot force-pushed the cherry-pick-10133-to-release-6.5 branch 2 times, most recently from 377734a to b33abb5 Compare January 22, 2024 11:46
@hongyunyan hongyunyan force-pushed the cherry-pick-10133-to-release-6.5 branch from b33abb5 to d93a4ca Compare January 22, 2024 12:04
@hongyunyan
Copy link
Collaborator

/retest

@hongyunyan
Copy link
Collaborator

/test verify

@hongyunyan
Copy link
Collaborator

/test cdc-integration-kafka-test

1 similar comment
@hongyunyan
Copy link
Collaborator

/test cdc-integration-kafka-test

@ti-chi-bot ti-chi-bot bot merged commit 62d1d01 into pingcap:release-6.5 Jan 22, 2024
12 of 13 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. type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants