Madan Jampani

Fix for recovering node availability after a temporary downtime. Currently we can only recover once.

Change-Id: I556273fa49aa745f0b742454a0529b8fa1251575
1 package org.onlab.onos.store.service.impl; 1 package org.onlab.onos.store.service.impl;
2 2
3 import static com.google.common.base.Verify.verifyNotNull; 3 import static com.google.common.base.Verify.verifyNotNull;
4 -import static org.slf4j.LoggerFactory.getLogger;
5 import static org.onlab.onos.store.service.impl.ClusterMessagingProtocol.SERIALIZER; 4 import static org.onlab.onos.store.service.impl.ClusterMessagingProtocol.SERIALIZER;
6 import static org.onlab.util.Tools.namedThreads; 5 import static org.onlab.util.Tools.namedThreads;
6 +import static org.slf4j.LoggerFactory.getLogger;
7 7
8 import java.io.IOException; 8 import java.io.IOException;
9 import java.util.concurrent.CompletableFuture; 9 import java.util.concurrent.CompletableFuture;
...@@ -12,6 +12,7 @@ import java.util.concurrent.ExecutorService; ...@@ -12,6 +12,7 @@ import java.util.concurrent.ExecutorService;
12 import java.util.concurrent.Executors; 12 import java.util.concurrent.Executors;
13 import java.util.concurrent.TimeUnit; 13 import java.util.concurrent.TimeUnit;
14 import java.util.concurrent.TimeoutException; 14 import java.util.concurrent.TimeoutException;
15 +
15 import net.kuujo.copycat.cluster.TcpMember; 16 import net.kuujo.copycat.cluster.TcpMember;
16 import net.kuujo.copycat.protocol.PingRequest; 17 import net.kuujo.copycat.protocol.PingRequest;
17 import net.kuujo.copycat.protocol.PingResponse; 18 import net.kuujo.copycat.protocol.PingResponse;
...@@ -227,6 +228,7 @@ public class ClusterMessagingProtocolClient implements ProtocolClient { ...@@ -227,6 +228,7 @@ public class ClusterMessagingProtocolClient implements ProtocolClient {
227 future.completeExceptionally(e); 228 future.completeExceptionally(e);
228 // Treating this client as disconnected 229 // Treating this client as disconnected
229 remoteNode = null; 230 remoteNode = null;
231 + appeared = null;
230 } catch (ExecutionException e) { 232 } catch (ExecutionException e) {
231 log.warn("RPCTask execution for {} failed: {}", request, e.getMessage()); 233 log.warn("RPCTask execution for {} failed: {}", request, e.getMessage());
232 log.debug("RPCTask execution for {} failed.", request, e); 234 log.debug("RPCTask execution for {} failed.", request, e);
......