This is an automated email from the ASF dual-hosted git repository.
msingh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 201fc85 RATIS-690. RaftClient should reconnect and change leader on
TimeoutIOException, AlreadyClosedException. Contributed by Lokesh Jain.
201fc85 is described below
commit 201fc850274896588e8da14fe0f939263bc80495
Author: Mukul Kumar Singh <[email protected]>
AuthorDate: Mon Sep 30 08:38:25 2019 +0530
RATIS-690. RaftClient should reconnect and change leader on
TimeoutIOException, AlreadyClosedException. Contributed by Lokesh Jain.
---
.../src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
a/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java
b/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java
index dfd1b11..b005cea 100644
---
a/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java
+++
b/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java
@@ -361,9 +361,7 @@ final class RaftClientImpl implements RaftClient {
}
LOG.debug("{}: oldLeader={}, curLeader={}, newLeader={}", clientId,
oldLeader, curLeader, newLeader);
- final boolean changeLeader =
- !(ioe instanceof AlreadyClosedException || ioe instanceof
TimeoutIOException)
- && newLeader != null && stillLeader;
+ final boolean changeLeader = newLeader != null && stillLeader;
final boolean reconnect = changeLeader || clientRpc.shouldReconnect(ioe);
if (reconnect) {
if (changeLeader && oldLeader.equals(leaderId)) {