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/tso: fix the panic issue when getTS in the follower #1930

Merged
merged 3 commits into from
Nov 12, 2019

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Nov 12, 2019

Signed-off-by: nolouch nolouch@gmail.com

What problem does this PR solve?

Details:

image

What is changed and how it works?

fix the nil pointer.

Check List

Tests

  • Unit test

Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch nolouch added the priority/P0 The issue has P0 priority. label Nov 12, 2019
@nolouch
Copy link
Contributor Author

nolouch commented Nov 12, 2019

/run-all-tests

@@ -265,9 +265,13 @@ func (t *TimestampOracle) GetRespTS(count uint32) (pdpb.Timestamp, error) {
return resp, errors.New("tso count should be positive")
}

failpoint.Inject("skipRetryGetTS", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add maxRetryCount to TimestampOracle to avoid using failpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's keep this variable unchanged inside bug fix firstly.

@you06
Copy link
Contributor

you06 commented Nov 12, 2019

/release

@nolouch nolouch added the needs-cherry-pick-release-3.1 The PR needs to cherry pick to release-3.1 branch. label Nov 12, 2019
@nolouch
Copy link
Contributor Author

nolouch commented Nov 12, 2019

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 12, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 12, 2019

/run-all-tests

@sre-bot sre-bot merged commit ba4f674 into tikv:master Nov 12, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 12, 2019

cherry pick to release-3.1 failed

nolouch added a commit to nolouch/pd that referenced this pull request Nov 12, 2019
nolouch added a commit that referenced this pull request Nov 15, 2019
nolouch added a commit to nolouch/pd that referenced this pull request Nov 25, 2019
nolouch added a commit to nolouch/pd that referenced this pull request Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-3.1 The PR needs to cherry pick to release-3.1 branch. priority/P0 The issue has P0 priority. status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants