Thomas Vachuska
Committed by Gerrit Code Review

Added retry to the config store, to recover from CM timeout exception.

Change-Id: I7eb53d94bdc8e3eb05a77f019829f8d450bcde52
......@@ -164,11 +164,11 @@ public class DistributedNetworkConfigStore
@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));
}
......