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

cdc rolling upgrade / scale-in ultilize two-phase-scheduling #1972

Merged
merged 64 commits into from
Jul 26, 2022

Conversation

3AceShowHand
Copy link
Contributor

@3AceShowHand 3AceShowHand commented Jul 1, 2022

What problem does this PR solve?

try close #1971

What is changed and how it works?

When rolling upgrade or scale in TiCDC instance, call DrainCapture to move all tables replicating on it to other running instance.

  • introduce cdc open api to support cdc rolling upgrade strategy.
  • Implement RollingUpgradeInstance interface for the TiCDC.
    • upgrade / patch / scale-in / reload will use the feature.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Code changes

Side effects

Related changes

Release notes:

Support rolling upgrade TiCDC

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 1, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nexustar

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 1, 2022
@3AceShowHand
Copy link
Contributor Author

My development Golang version is 1.18.3, I will fix the go mod file after the feature code finished.

@codecov-commenter
Copy link

codecov-commenter commented Jul 6, 2022

Codecov Report

Merging #1972 (4e40a08) into master (ff88990) will decrease coverage by 12.55%.
The diff coverage is 6.30%.

❗ Current head 4e40a08 differs from pull request most recent head 05ccc02. Consider uploading reports for the commit 05ccc02 to get more accurate results

@@             Coverage Diff             @@
##           master    #1972       +/-   ##
===========================================
- Coverage   52.54%   39.98%   -12.55%     
===========================================
  Files         307      291       -16     
  Lines       35485    34940      -545     
===========================================
- Hits        18643    13970     -4673     
- Misses      14648    19369     +4721     
+ Partials     2194     1601      -593     
Flag Coverage Δ
cluster 36.06% <6.34%> (-5.06%) ⬇️
dm ?
playground ?
tiup ?
unittest 20.82% <1.33%> (-0.20%) ⬇️

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

Impacted Files Coverage Δ
components/dm/command/scale_in.go 8.62% <0.00%> (-50.51%) ⬇️
pkg/cluster/api/cdcapi.go 0.00% <0.00%> (ø)
pkg/cluster/api/pdapi.go 41.30% <ø> (-17.75%) ⬇️
pkg/cluster/manager/scale_in.go 0.00% <ø> (-46.60%) ⬇️
pkg/cluster/operation/destroy.go 47.67% <0.00%> (-12.42%) ⬇️
pkg/cluster/operation/scale_in.go 0.00% <0.00%> (-55.13%) ⬇️
pkg/cluster/spec/bindversion.go 90.91% <ø> (ø)
pkg/cluster/spec/cdc.go 36.21% <0.00%> (-40.64%) ⬇️
pkg/cluster/spec/spec.go 82.34% <0.00%> (-1.93%) ⬇️
pkg/cluster/operation/upgrade.go 47.42% <14.81%> (-8.46%) ⬇️
... and 138 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff88990...05ccc02. Read the comment docs.

@3AceShowHand 3AceShowHand changed the title [DNM] cdc rolling upgrade / scale-in ultilize two-phase-scheduling cdc rolling upgrade / scale-in ultilize two-phase-scheduling Jul 6, 2022
@ti-chi-bot
Copy link
Member

@3AceShowHand: GitHub didn't allow me to request PR reviews from the following users: overvenus.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @overvenus

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.

go.mod Outdated Show resolved Hide resolved
pkg/utils/http_client.go Outdated Show resolved Hide resolved
pkg/cluster/api/cdcapi.go Outdated Show resolved Hide resolved
pkg/cluster/api/cdcapi.go Show resolved Hide resolved
pkg/cluster/api/cdcapi.go Outdated Show resolved Hide resolved
pkg/cluster/api/cdcapi.go Outdated Show resolved Hide resolved
pkg/cluster/operation/action.go Outdated Show resolved Hide resolved
pkg/cluster/api/cdcapi.go Outdated Show resolved Hide resolved
pkg/cluster/api/cdcapi.go Outdated Show resolved Hide resolved
pkg/cluster/api/cdcapi.go Show resolved Hide resolved
Copy link
Collaborator

@nexustar nexustar left a comment

Choose a reason for hiding this comment

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

not familiar with TiCDC openapi, rest LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 25, 2022
@AstroProfundis
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 05ccc02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiUP support TiCDC rolling upgrade
6 participants