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) #1759

Merged
merged 6 commits into from
May 27, 2021

Conversation

asddongmen
Copy link
Contributor

What problem does this PR solve?

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

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 802 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 11, 2021
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 11, 2021
@asddongmen
Copy link
Contributor Author

/type cherry-pick-for-release-5.0

@ti-chi-bot ti-chi-bot added the type/cherry-pick-for-release-5.0 This PR is cherry-picked to release-5.0 from a source PR. label May 11, 2021
@lonng lonng added this to the v5.0.2 milestone May 11, 2021
@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 26, 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 added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 27, 2021
@lonng lonng added the cherry-pick-approved Cherry pick PR approved by release team. label May 27, 2021
@amyangfei amyangfei added the release-blocker This issue blocks a release. Please solve it ASAP. label May 27, 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: dff895d

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

/run-kafka-tests

@amyangfei
Copy link
Contributor

/run-integration-tests
/run-kafka-tests

@amyangfei
Copy link
Contributor

/run-kafka-tests

1 similar comment
@amyangfei
Copy link
Contributor

/run-kafka-tests

@amyangfei
Copy link
Contributor

/run-integration-tests
/run-kafka-tests

@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.

@ti-chi-bot ti-chi-bot merged commit ff9a93c into pingcap:release-5.0 May 27, 2021
@asddongmen asddongmen deleted the release-5.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. release-blocker This issue blocks a release. Please solve it ASAP. 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. type/cherry-pick-for-release-5.0 This PR is cherry-picked to release-5.0 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants