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

store/tikv/oracle : add GetStaleTimestamp to get generate a timestamp which represents for the timestamp prevSecond secs ago. #21713

Merged
merged 28 commits into from
Dec 18, 2020

Conversation

Andrewmatilde
Copy link
Contributor

What problem does this PR solve?

ref: #21522

What is changed and how it works?

Check List

Tests

  • Unit test

Side effects

  • Increased code complexity
  • Breaking backward compatibility

Release note

  • No release note

Signed-off-by: Andrewmatilde <[email protected]>
Signed-off-by: Andrewmatilde <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Dec 14, 2020

CLA assistant check
All committers have signed the CLA.

@ti-srebot ti-srebot added the first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. label Dec 14, 2020
Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

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

plz address the comment.

store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
Signed-off-by: Andrewmatilde <[email protected]>
Signed-off-by: Andrewmatilde <[email protected]>
Signed-off-by: Andrewmatilde <[email protected]>
Signed-off-by: Andrewmatilde <[email protected]>
Signed-off-by: Andrewmatilde <[email protected]>
Signed-off-by: Andrewmatilde <[email protected]>
Signed-off-by: Andrewmatilde <[email protected]>
Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

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

We also need to maintain the last arrival timestamp.

store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
@Andrewmatilde
Copy link
Contributor Author

PTAL @Yisaer

go.mod Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd_test.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracle.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd_test.go Outdated Show resolved Hide resolved
Signed-off-by: Andrewmatilde <[email protected]>
Copy link
Contributor

@Yisaer Yisaer 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. @djshow832 PTAL

store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
store/tikv/oracle/oracles/pd.go Outdated Show resolved Hide resolved
Signed-off-by: Andrewmatilde <[email protected]>
Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 17, 2020
Copy link
Member

@nolouch nolouch left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Dec 17, 2020
@nolouch
Copy link
Member

nolouch commented Dec 17, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 17, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@Andrewmatilde merge failed.

@Andrewmatilde
Copy link
Contributor Author

/run-all-tests

@Andrewmatilde
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor

@Andrewmatilde Oops! auto merge is restricted to Committers of the SIG.You are not a committer or co-leader or leader.

@nolouch
Copy link
Member

nolouch commented Dec 18, 2020

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. 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.

5 participants