-
Notifications
You must be signed in to change notification settings - Fork 118
Optimize grpc forward and switch leader logic #324
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
Optimize grpc forward and switch leader logic #324
Conversation
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
src/main/java/org/tikv/common/region/AbstractRegionStoreClient.java
Outdated
Show resolved
Hide resolved
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
|
/run-all-tests |
src/main/java/org/tikv/common/region/AbstractRegionStoreClient.java
Outdated
Show resolved
Hide resolved
src/main/java/org/tikv/common/region/AbstractRegionStoreClient.java
Outdated
Show resolved
Hide resolved
src/main/java/org/tikv/common/region/AbstractRegionStoreClient.java
Outdated
Show resolved
Hide resolved
| boolean exceptionEncountered = pair.second; | ||
| if (peer == null) { | ||
| if (!exceptionEncountered) { | ||
| // all response returned normally, the leader is not elected, just wait until it is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will it retry forever if the client is disconnected from all the tikv servers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do in next pr
src/main/java/org/tikv/common/region/AbstractRegionStoreClient.java
Outdated
Show resolved
Hide resolved
| String.format( | ||
| "leader for region[%d] is not elected, just wait until it is ready", | ||
| region.getId())); | ||
| return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do in next pr
src/main/java/org/tikv/common/region/AbstractRegionStoreClient.java
Outdated
Show resolved
Hide resolved
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
src/main/java/org/tikv/common/region/AbstractRegionStoreClient.java
Outdated
Show resolved
Hide resolved
src/main/java/org/tikv/common/region/AbstractRegionStoreClient.java
Outdated
Show resolved
Hide resolved
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
zz-jason
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
format failed |
|
@zz-jason PTAL |
|
/merge |
|
/run-all-tests |
marsishandsome
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
No description provided.