commit | b5c63a0af25b3b60c86d4ac053122899d518d6e1 | [log] [tgz] |
---|---|---|
author | Ayaka Koshibe <ayaka@onlab.us> | Sat Oct 18 18:42:27 2014 -0700 |
committer | Ayaka Koshibe <ayaka@onlab.us> | Sat Oct 18 18:42:27 2014 -0700 |
tree | 6b569e14223af685d59ea3dfe6e6d66dabee1341 | |
parent | 760a7f974577ed0ded8bfd428cef37460f2efec2 [diff] [blame] |
fixes for mastership handoff race conditions Change-Id: Ifed733df1bdc3b144b6a341a9322838ea2aacd72
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java index 6e8a367..8cf78e5 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java
@@ -360,7 +360,14 @@ final LinkKey key = linkKey(src, dst); DeviceId dstDeviceId = dst.deviceId(); - Timestamp timestamp = deviceClockService.getTimestamp(dstDeviceId); + Timestamp timestamp = null; + try { + timestamp = deviceClockService.getTimestamp(dstDeviceId); + } catch (IllegalStateException e) { + //there are times when this is called before mastership + // handoff correctly completes. + return null; + } LinkEvent event = removeLinkInternal(key, timestamp);