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

api(cdc): fix create changefeed after scale-in pd #12003

Merged
merged 7 commits into from
Jan 21, 2025

Conversation

lidezhu
Copy link
Collaborator

@lidezhu lidezhu commented Jan 15, 2025

What problem does this PR solve?

Issue Number: close #12004

What is changed and how it works?

When the api request doesn't contain any pd address, we previously use the old pd address to create a new pd client.
If the old pd address are all scaled-in, the newly created pd client cannot connect to the upstream.
To fix this problem, in this case we should use pd client in the default upstream of the capture which can manage pd scale-in/scale-out internally.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
  1. Deploy a cluster with 3 pds;
  2. Scale out 3 new pds;
  3. Transfer pd leader;
  4. Scale in 3 old pds;
  5. Create changefeed;

Questions

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

Release note

Fix create changefeed after scale in pds in some scenarios.

@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. do-not-merge/needs-triage-completed and removed do-not-merge/needs-linked-issue do-not-merge/needs-triage-completed labels Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 78.40909% with 19 lines in your changes missing coverage. Please review.

Project coverage is 55.3902%. Comparing base (fa5baad) to head (bc53da5).
Report is 5 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
Components Coverage Δ
cdc 59.8619% <78.4090%> (+0.1328%) ⬆️
dm 50.1708% <ø> (+0.0268%) ⬆️
engine 53.2505% <ø> (+0.0564%) ⬆️
Flag Coverage Δ
unit 55.3902% <78.4090%> (+0.1100%) ⬆️

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

@@               Coverage Diff                @@
##             master     #12003        +/-   ##
================================================
+ Coverage   55.2801%   55.3902%   +0.1100%     
================================================
  Files          1028       1028                
  Lines        142724     142991       +267     
================================================
+ Hits          78898      79203       +305     
+ Misses        58052      58000        -52     
- Partials       5774       5788        +14     

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 20, 2025
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 21, 2025
Copy link
Contributor

ti-chi-bot bot commented Jan 21, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-20 03:40:57.796001755 +0000 UTC m=+65785.126921153: ☑️ agreed by asddongmen.
  • 2025-01-21 02:23:17.464513999 +0000 UTC m=+147524.795433403: ☑️ agreed by hongyunyan.

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jan 21, 2025

@yudongusa PTAL

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jan 21, 2025

/assign

Copy link
Contributor

ti-chi-bot bot commented Jan 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asddongmen, hongyunyan, yudongusa

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 21, 2025
@ti-chi-bot ti-chi-bot bot merged commit ef96454 into master Jan 21, 2025
28 checks passed
@ti-chi-bot ti-chi-bot bot deleted the fix-create-changefeed0115 branch January 21, 2025 06:19
@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. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Jan 21, 2025
@lidezhu
Copy link
Collaborator Author

lidezhu commented Jan 21, 2025

/run-cherry-picker

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Jan 21, 2025
ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Jan 21, 2025
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Jan 21, 2025
@ti-chi-bot
Copy link
Member

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

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. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to create changefeed after scale-in pd
5 participants