commit | 46654c3307220603a25520e01566c14721966c0a | [log] [tgz] |
---|---|---|
author | Yi Tseng <a86487817@gmail.com> | Tue Aug 08 19:09:19 2017 -0700 |
committer | Charles Chan <charles@opennetworking.org> | Wed Aug 09 21:27:25 2017 +0000 |
tree | 12baffe156dd3e70570510929425bda9dc33bda2 | |
parent | a0efdcc803eda2bf72935dead17cabd51fa83f83 [diff] |
[CORD-1113] Fix race condition problem of DistributedRouteStore Race condition happened if one node add event listener after other nodes send event. The local route table might not be initialized correctly Change-Id: Id6ff1344897e36d7d48ccf36b1b0b843ea2e9d09
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DistributedRouteStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DistributedRouteStore.java index 3263ae6..703b165 100644 --- a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DistributedRouteStore.java +++ b/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DistributedRouteStore.java
@@ -88,14 +88,14 @@ .build() .asDistributedSet(); - masterRouteTable.forEach(this::createRouteTable); - masterRouteTable.addListener(masterRouteTableListener); // Add default tables (add is idempotent) masterRouteTable.add(IPV4); masterRouteTable.add(IPV6); + masterRouteTable.forEach(this::createRouteTable); + log.info("Started"); }