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

tikv: make region_request_test stable #11541

Merged
merged 4 commits into from
Jul 31, 2019
Merged

tikv: make region_request_test stable #11541

merged 4 commits into from
Jul 31, 2019

Conversation

lysu
Copy link
Contributor

@lysu lysu commented Jul 31, 2019

What problem does this PR solve?

old TestOnSendFailedWithCloseKnownStoreThenUseNewOne test is occasionally failed

[2019-07-30T11:52:47.513Z] FAIL: region_request_test.go:92: testRegionRequestSuite.TestOnSendFailedWithCloseKnownStoreThenUseNewOne
[2019-07-30T11:52:47.513Z]
[2019-07-30T11:52:47.513Z] region_request_test.go:127:
[2019-07-30T11:52:47.513Z]     c.Assert(err, IsNil)
[2019-07-30T11:52:47.513Z] ... value *errors.withStack = [tikv:9002]TiKV server timeout ("[tikv:9002]TiKV server timeout")
[2019-07-30T11:52:47.513Z]

the old test has a problem new store never be a leader and accept the request.

and old assert will be failed to because of async scheduleReload + race/leak slow running.

What is changed and how it works?

elect a new leader to another store when one store fails

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • N/A

Side effects

  • N/A

Related changes

  • Need to cherry-pick to the release branch

This change is Reviewable

@lysu
Copy link
Contributor Author

lysu commented Jul 31, 2019

/run-all-tests

@codecov
Copy link

codecov bot commented Jul 31, 2019

Codecov Report

Merging #11541 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11541   +/-   ##
===========================================
  Coverage   81.2937%   81.2937%           
===========================================
  Files           425        425           
  Lines         91643      91643           
===========================================
  Hits          74500      74500           
  Misses        11788      11788           
  Partials       5355       5355

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM

@zimulala zimulala added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 31, 2019
Copy link
Member

@ngaut ngaut left a comment

Choose a reason for hiding this comment

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

LGTM

@ngaut ngaut merged commit 9f68166 into pingcap:master Jul 31, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Jul 31, 2019

cherry pick to release-3.0 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test component/tikv status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants