commit | 5d5ea4721cc16fb82349c5a14caa62830656f5e5 | [log] [tgz] |
---|---|---|
author | Jordan Halterman <jordan@opennetworking.org> | Sun Jul 29 02:39:45 2018 -0700 |
committer | Thomas Vachuska <tom@opennetworking.org> | Fri Aug 03 23:23:40 2018 +0000 |
tree | 9ff35b1a43ffb0e68e2224000065b52d178f2486 | |
parent | 47985ab260714e9710013418aedaa70ef453715d [diff] |
[ONOS-7754] Re-populate failure detector with existing node states to avoid failure detections following component configuration change in ClusterStore Change-Id: Iae27489f8a59da5461370e520646e8734c0303d3
diff --git a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedClusterStore.java b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedClusterStore.java index 306ebcb..408c13a 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedClusterStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedClusterStore.java
@@ -459,6 +459,11 @@ this.minStandardDeviationMillis = minStandardDeviationMillis; try { failureDetector = new PhiAccrualFailureDetector(minStandardDeviationMillis); + nodeStates.forEach((nodeId, state) -> { + if (state != State.INACTIVE) { + failureDetector.report(nodeId); + } + }); } catch (IllegalArgumentException e) { log.warn(e.getMessage()); this.minStandardDeviationMillis = DEFAULT_MIN_STANDARD_DEVIATION_MILLIS;