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: Modified the update strategy of gcSafePoint (#1731) #1756

Merged
merged 3 commits into from
May 11, 2021

Conversation

asddongmen
Copy link
Contributor

@asddongmen asddongmen commented May 10, 2021

What problem does this PR solve?

TiKV GC safe point will be blocked indefinitely due to TiCDC changefeed checkpoint stagnation.

pick #1731

What is changed and how it works?

Set a threshold Y: Regardless of the status of the changefeed, TiCDC is allowed to block TiKV GC safe time for Y hours at most.

The threshold Y is set in the config/config.go file as a variable named gc-TTL and the default value is 84000 seconds (24 hours).

Check List

Tests

  • Unit test

  • Manual test (add detailed scripts or steps below)
    step1: set defaultServerConfig.gcTTL = 20 in /pkg/config.go

step2: add log.Warn("try to update gcSafePoint", zap.Time("gcSafePoint", oracle.GetTimeFromTS(gcSafePoint))) below line 799 in cdc/owner.go to print log info

step3: In a shell window type tiup playground to deploy a tidb cluster.

step4: Move to ticdc directory, and type ./bin/cdc server to to start the cdc component。

step5: Type ./cdc cli changefeed create --pd=http://127.0.0.1:2379 --sink-uri="mysql://root@127.0.0.1:4000/" --changefeed-id="ttl-test-10" to create a changefeed.

step6: pause above changefeed, you would see gcSafePoint stop update:
image

step7: gcSafePoint update again after stop 20s:
image

Code changes

  • Has exported function/method change

Side effects

  • Possible performance regression

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release note

  • Modified the update strategy of gcSafePoint. Fix the problem that TiKV GC safe point is blocked indefinitely due to TiCDC changefeed checkpoint stagnation.

@ti-chi-bot ti-chi-bot added the contribution This PR is from a community contributor. label May 10, 2021
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 10, 2021
@asddongmen asddongmen changed the title Release 4.0 owner: Modified the update strategy of gcSafePoint May 10, 2021
@asddongmen asddongmen changed the title owner: Modified the update strategy of gcSafePoint owner: Modified the update strategy of gcSafePoint (#1731) May 10, 2021
@ti-chi-bot ti-chi-bot added type/cherry-pick-for-release-5.0 This PR is cherry-picked to release-5.0 from a source PR. type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR. and removed type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR. type/cherry-pick-for-release-5.0 This PR is cherry-picked to release-5.0 from a source PR. labels May 10, 2021
@asddongmen
Copy link
Contributor Author

/type cherry-pick-for-release-4.0

@ti-chi-bot ti-chi-bot added the type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR. label May 10, 2021
@asddongmen
Copy link
Contributor Author

asddongmen commented May 10, 2021

/ptal

@ti-chi-bot
Copy link
Member

@asddongmen: These labels are not set on the issue: type/cherry-pick-for-release-5.0.

In response to this:

/remove-type cherry-pick-for-release-5.0

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot added type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR. and removed type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR. labels May 10, 2021
@ti-chi-bot
Copy link
Member

@asddongmen: The label(s) status/ptal cannot be applied, because the repository doesn't have them.

In response to this:

/status PTAL

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 ti-community-infra/tichi repository.

@zier-one
Copy link
Contributor

/run-all-tests

@zier-one
Copy link
Contributor

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 10, 2021
@asddongmen
Copy link
Contributor Author

/run-all-tests

@asddongmen
Copy link
Contributor Author

run-integration-tests

@zier-one
Copy link
Contributor

/run-integration-tests

@zier-one
Copy link
Contributor

/run-kafka-tests

@amyangfei amyangfei added this to the v4.0.13 milestone May 11, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • amyangfei
  • leoppro

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot removed the status/LGT1 Indicates that a PR has LGTM 1. label May 11, 2021
@ti-chi-bot ti-chi-bot added the status/LGT2 Indicates that a PR has LGTM 2. label May 11, 2021
@zier-one
Copy link
Contributor

/run-integration-tests

@amyangfei amyangfei added the status/ptal Could you please take a look? label May 11, 2021
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label May 11, 2021
@amyangfei
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 9ce4089

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 11, 2021
@ti-chi-bot
Copy link
Member

@asddongmen: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@asddongmen
Copy link
Contributor Author

/run-all-tests

@asddongmen
Copy link
Contributor Author

/run-integration-tests

@ti-chi-bot ti-chi-bot merged commit 2f9064f into pingcap:release-4.0 May 11, 2021
@asddongmen asddongmen deleted the release-4.0 branch August 5, 2021 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. contribution This PR is from a community contributor. size/L Denotes a PR that changes 100-499 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. status/ptal Could you please take a look? type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants