commit | 6224a19328c4782c6b21d07cb5f40485a9479d78 | [log] [tgz] |
---|---|---|
author | Thomas Vachuska <tom@onlab.us> | Thu Jul 30 16:11:40 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Fri Jul 31 19:28:31 2015 +0000 |
tree | f8607ffede9419730d1bc30cc19039defc11edc4 | |
parent | c0e2013d5f5cad8b2ada7d7367eea4878141dbfb [diff] |
Added retry to the config store, to recover from CM timeout exception. Change-Id: I7eb53d94bdc8e3eb05a77f019829f8d450bcde52
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java index e2a4b4f..0b7c095 100644 --- a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java +++ b/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java
@@ -164,11 +164,11 @@ @Override public <S, T extends Config<S>> T getConfig(S subject, Class<T> configClass) { - // FIXME: There has to be a better way to absorb the timeout exceptions. + // FIXME: There has to be a better way to absorb the timeout exceptions! Versioned<ObjectNode> json = null; try { json = configs.get(key(subject, configClass)); - } catch (ConsistentMapException.Timeout e) { + } catch (ConsistentMapException e) { Tools.randomDelay(MAX_BACKOFF); json = configs.get(key(subject, configClass)); }