Committed by
Gerrit Code Review
Added retry to the config store, to recover from CM timeout exception.
Change-Id: I7eb53d94bdc8e3eb05a77f019829f8d450bcde52
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -164,11 +164,11 @@ public class DistributedNetworkConfigStore | ... | @@ -164,11 +164,11 @@ public class DistributedNetworkConfigStore |
164 | 164 | ||
165 | @Override | 165 | @Override |
166 | public <S, T extends Config<S>> T getConfig(S subject, Class<T> configClass) { | 166 | public <S, T extends Config<S>> T getConfig(S subject, Class<T> configClass) { |
167 | - // FIXME: There has to be a better way to absorb the timeout exceptions. | 167 | + // FIXME: There has to be a better way to absorb the timeout exceptions! |
168 | Versioned<ObjectNode> json = null; | 168 | Versioned<ObjectNode> json = null; |
169 | try { | 169 | try { |
170 | json = configs.get(key(subject, configClass)); | 170 | json = configs.get(key(subject, configClass)); |
171 | - } catch (ConsistentMapException.Timeout e) { | 171 | + } catch (ConsistentMapException e) { |
172 | Tools.randomDelay(MAX_BACKOFF); | 172 | Tools.randomDelay(MAX_BACKOFF); |
173 | json = configs.get(key(subject, configClass)); | 173 | json = configs.get(key(subject, configClass)); |
174 | } | 174 | } | ... | ... |
-
Please register or login to post a comment