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

owner, gcutil: always update service GC safepoint when owner finds new changefeeds #2512

Merged
merged 24 commits into from
Sep 17, 2021

Conversation

overvenus
Copy link
Member

@overvenus overvenus commented Aug 12, 2021

What problem does this PR solve?

Extend creating service gc safepoint ttl to 1 hr to support creating changefeeds that needs long initialization time.
Also let TiCDC always update service GC safepoint when it finds a new changefeed, see https://github.com/pingcap/ticdc/pull/2512/files#diff-0e06be9eaec63633a515c0b4eafda0d674cfa49885009c96b1389c1f1002f22cR335

Close https://github.com/pingcap/ticdc/issues/2470

image

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Create a changefeed that captures 60k tables.

Related changes

  • Need to cherry-pick to the release branch

Release note

Extend creating service gc safepoint ttl to 1 hr to support creating changefeeds that needs long initialization time.

@overvenus overvenus added type/bugfix This PR fixes a bug. needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. needs-cherry-pick-release-5.1 Should cherry pick this PR to release-5.1 branch. needs-cherry-pick-release-5.2 Should cherry pick this PR to release-5.2 branch. labels Aug 12, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 12, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • amyangfei
  • asddongmen

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 release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 12, 2021
@ti-chi-bot ti-chi-bot requested review from liuzix and lonng August 12, 2021 11:22
@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 12, 2021
@amyangfei
Copy link
Contributor

amyangfei commented Aug 12, 2021

This patch changes the behavior of GC, which means each time user creates a new changefeed, the GC will be blocked by 1 hour. Is this acceptable @leoppro

@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 6, 2021
@overvenus overvenus changed the title pkg/util: extend creating service gc safepoint ttl to 1 hr owner, gcutil: always update service GC safepoint when owner finds new changefeeds Sep 7, 2021
@Rustin170506
Copy link
Member

/cc

pkg/gcutil/gc_service.go Outdated Show resolved Hide resolved
pkg/gcutil/gc_service.go Outdated Show resolved Hide resolved
cdc/owner/changefeed.go Outdated Show resolved Hide resolved
cdc/capture/http_validatior.go Outdated Show resolved Hide resolved
pkg/gcutil/gc_manager.go Outdated Show resolved Hide resolved
pkg/gcutil/gc_manager.go Outdated Show resolved Hide resolved
// initializing.
//
// See more gcutil doc.
if err = o.updateGCSafepoint(stdCtx, state); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

What if updating GC safepoint failed here? updateGCSafepoint doesn't guarantee the update op must succeed

Copy link
Member Author

Choose a reason for hiding this comment

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

The current implementation update gc safepoint on a best-efforts basis.
updateGCSafepoint retries internally, also we update ticdc-creating-<ID>'s TTL to 10min when we initialize changefeed in case updateGCSafepoint fails.

@overvenus
Copy link
Member Author

/run-all-tests

@overvenus
Copy link
Member Author

/run-leak-tests
/run-integration-tests

@Rustin170506
Copy link
Member

/run-integration-tests

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 17, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 17, 2021
@Rustin170506
Copy link
Member

/run-all-tests

@Rustin170506
Copy link
Member

/run-all-tests

@Rustin170506
Copy link
Member

/run-kafka-tests

@ti-chi-bot ti-chi-bot merged commit 1251b6a into pingcap:master Sep 17, 2021
ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Sep 17, 2021
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #2851.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #2852.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #2853.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #2854.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. needs-cherry-pick-release-5.1 Should cherry pick this PR to release-5.1 branch. needs-cherry-pick-release-5.2 Should cherry pick this PR to release-5.2 branch. 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. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
5 participants