commit | 2c1d847ec4832cac515735f3edc3009257928565 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Fri Oct 31 14:13:38 2014 -0700 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Fri Oct 31 23:21:39 2014 -0700 |
tree | ea34ba8a6ceef989e99e43b29f1a7e2231579c17 | |
parent | 2d3cd31c61275cf564d92a1de64a5084761a6950 [diff] |
Dist.FlowRuleStore: return empty when no master Change-Id: I377003b5e1631ead05ab3d32bf670f52372de55d
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java index bd2742a..ca3b29c 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java
@@ -284,9 +284,10 @@ if (!replicaInfo.master().isPresent()) { log.warn("No master for {}", deviceId); - // TODO: revisit if this should be returning empty collection. + // TODO: revisit if this should be returning empty collection or throwing exception. // FIXME: throw a FlowStoreException - throw new RuntimeException("No master for " + deviceId); + //throw new RuntimeException("No master for " + deviceId); + return Collections.emptyList(); } if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) {