commit | 7d61ab221090159fd701fbee7d0d5707cf752b38 | [log] [tgz] |
---|---|---|
author | Thomas Vachuska <tom@onlab.us> | Mon Jun 13 19:41:52 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Tue Jun 14 02:52:51 2016 +0000 |
tree | 0139122ec41583a41a7caed7cd89a50b0159158e | |
parent | ab753e1e9ce4c61cb23c919a437af5e70a9c747a [diff] |
ONOS-4656 Addressing issue where intents get stuck in PURGE_REQ state. Change-Id: I223ff14856fadb8d6e913883b42a5e53bbbbc6db
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java index 884d86a..3c42346 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
@@ -176,8 +176,12 @@ if (IntentData.isUpdateAcceptable(currentData, newData)) { // Only the master is modifying the current state. Therefore assume // this always succeeds - if (newData.state() == PURGE_REQ && currentData != null) { - currentMap.remove(newData.key(), currentData); + if (newData.state() == PURGE_REQ) { + if (currentData != null) { + currentMap.remove(newData.key(), currentData); + } else { + log.info("Gratuitous purge request for intent: {}", newData.key()); + } } else { currentMap.put(newData.key(), new IntentData(newData)); }