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: forbid to try to get a connection forever #11391

Merged
merged 6 commits into from
Jul 24, 2019

Conversation

hicqu
Copy link
Contributor

@hicqu hicqu commented Jul 23, 2019

What problem does this PR solve?

SendRequest could be block forever if all connectons are broken.

What is changed and how it works?

Forbid to try to get a connection forever so that SendRequest can return immediately and try an another target peer.

Check List

Tests

  • unit tests

Related changes

  • Need to cherry-pick to the release branch

@hicqu hicqu requested review from tiancaiamao and lysu July 23, 2019 09:47
Copy link
Contributor

@lysu lysu 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

@@ -22,6 +22,9 @@ import (
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/tikvpb"
"github.com/pingcap/tidb/config"
"github.com/pingcap/tidb/store/tikv/tikvrpc"

"fmt"
Copy link
Contributor

Choose a reason for hiding this comment

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

need move import to first group

@lysu
Copy link
Contributor

lysu commented Jul 23, 2019

@hicqu maybe better edit the description to follow TIDB PR template, our QA's tools will rely on PR template

@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #11391 into master will decrease coverage by 0.0661%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             master     #11391        +/-   ##
================================================
- Coverage   81.3685%   81.3024%   -0.0662%     
================================================
  Files           423        423                
  Lines         90648      90616        -32     
================================================
- Hits          73759      73673        -86     
- Misses        11577      11619        +42     
- Partials       5312       5324        +12

@lysu lysu added component/tikv type/enhancement The issue or PR belongs to an enhancement. labels Jul 23, 2019
@lysu lysu changed the title forbid to try to get a connection forever tikv: forbid to try to get a connection forever Jul 23, 2019
@lysu
Copy link
Contributor

lysu commented Jul 23, 2019

/run-all-tests

@tiancaiamao
Copy link
Contributor

LGTM

@jackysp
Copy link
Member

jackysp commented Jul 23, 2019

Please fix CI.

@lysu
Copy link
Contributor

lysu commented Jul 23, 2019

/run-all-tests

Copy link
Contributor

@lysu lysu left a comment

Choose a reason for hiding this comment

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

LGTM

@hicqu hicqu merged commit 2225d5f into pingcap:master Jul 24, 2019
@hicqu hicqu deleted the dont-get-client-forever branch July 24, 2019 04:10
@sre-bot
Copy link
Contributor

sre-bot commented Jul 24, 2019

cherry pick to release-3.0 in PR #11404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tikv type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants