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: Fix gcttl bug #1861

Merged
merged 11 commits into from
May 29, 2021
Merged

Owner: Fix gcttl bug #1861

merged 11 commits into from
May 29, 2021

Conversation

asddongmen
Copy link
Contributor

What problem does this PR solve?

#1839

What is changed and how it works?

Modify the calculation method of MinGCSafePoint (the lower bound of CDC's gcSafePoint)

Before:
MinGCSafePoint = curentTs - gcTTL

After:
MinGCSafePoint = min(curentTs - gcTTL, pdSafePoint)

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Side effects

  • Increased code complexity

Related changes

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

Release note

  • owner: When tikv_gc_life_time is greater than gcttl, use tikv_gc_life_time to calculate the lower bound of gcSafePoint.

@asddongmen asddongmen added the status/ptal Could you please take a look? label May 27, 2021
@asddongmen asddongmen added this to the v5.0.2 milestone May 27, 2021
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 27, 2021
cdc/owner.go Outdated Show resolved Hide resolved
cdc/owner.go Outdated Show resolved Hide resolved
cdc/owner.go Outdated Show resolved Hide resolved
@amyangfei amyangfei added 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. release-blocker This issue blocks a release. Please solve it ASAP. labels May 27, 2021
cdc/owner.go Outdated Show resolved Hide resolved
cdc/owner.go Outdated Show resolved Hide resolved
Copy link
Contributor

@liuzix liuzix left a comment

Choose a reason for hiding this comment

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

rest /lgtm

cdc/owner.go Outdated Show resolved Hide resolved
cdc/owner.go Outdated
if changefeed.status.CheckpointTs < minGCSafePoint {
// 2. We need the <= check here is because when a changefeed is stagnant, its checkpointTs will be updated to pd,
// and it would be the minimum gcSafePoint of cdc. In order to avoid circular dependence, it is necessary to check for equality.
// Checking whether they are equal will make the loop assignment to happen only once, and then it will be skipped in next time.
Copy link
Contributor

Choose a reason for hiding this comment

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

What is loop assignment? Can you be more specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

cdc/owner.go Show resolved Hide resolved
@amyangfei
Copy link
Contributor

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 28, 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 28, 2021
@zier-one
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: a265de3

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

/rebuild

@asddongmen
Copy link
Contributor Author

/run-all-tests

@amyangfei
Copy link
Contributor

/run-unit-tests

@amyangfei
Copy link
Contributor

/run-all-tests

1 similar comment
@amyangfei
Copy link
Contributor

/run-all-tests

@asddongmen
Copy link
Contributor Author

/rerun-integration-tests

@amyangfei
Copy link
Contributor

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

@amyangfei
Copy link
Contributor

/run-kafka-tests

2 similar comments
@amyangfei
Copy link
Contributor

/run-kafka-tests

@amyangfei
Copy link
Contributor

/run-kafka-tests

@ti-chi-bot ti-chi-bot merged commit 714bc03 into pingcap:master May 29, 2021
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@asddongmen asddongmen deleted the fix_gcttl_bug branch May 29, 2021 08:27
ti-chi-bot added a commit that referenced this pull request May 31, 2021
ti-chi-bot added a commit that referenced this pull request Jun 24, 2021
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. 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. status/ptal Could you please take a look?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants