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

server: Fix the bug that infinite TTL for service safepoint doesn't work (#3138) #3143

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #3138 to release-4.0


Signed-off-by: MyonKeminta MyonKeminta@users.noreply.github.com

Fix infinite TTL doesn't work

Signed-off-by: MyonKeminta MyonKeminta@users.noreply.github.com

What problem does this PR solve?

Fixes #3128

What is changed and how it works?

In the original code the expire time of service safepoints are calculated by time.Unit() + TTL, and we use MaxInt64 to represent infinite TTL. Then it overflows to a minus value and expires immediately. This PR fixes the issue.

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch
    • release-4.0

Release note

  • Fix a bug that service safe points with infinite TTL may disappear.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@nolouch
Copy link
Contributor

nolouch commented Nov 10, 2020

/merge

@ti-chi-bot
Copy link
Member

@nolouch: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 tidb-community-bots/prow-config repository.

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

Can merge label has been added.

Git tree hash: b2135a6

@rleungx
Copy link
Member

rleungx commented Nov 12, 2020

/run-integration-ddl-test

@rleungx
Copy link
Member

rleungx commented Nov 12, 2020

/merge

@ti-chi-bot
Copy link
Member

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 tidb-community-bots/prow-config repository.

@ti-chi-bot ti-chi-bot merged commit 465b03c into tikv:release-4.0 Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants