Thomas Vachuska
Committed by Gerrit Code Review

ONOS-4656 Addressing issue where intents get stuck in PURGE_REQ state.

Change-Id: I223ff14856fadb8d6e913883b42a5e53bbbbc6db
...@@ -177,8 +177,12 @@ public class GossipIntentStore ...@@ -177,8 +177,12 @@ public class GossipIntentStore
177 if (IntentData.isUpdateAcceptable(currentData, newData)) { 177 if (IntentData.isUpdateAcceptable(currentData, newData)) {
178 // Only the master is modifying the current state. Therefore assume 178 // Only the master is modifying the current state. Therefore assume
179 // this always succeeds 179 // this always succeeds
180 - if (newData.state() == PURGE_REQ && currentData != null) { 180 + if (newData.state() == PURGE_REQ) {
181 - currentMap.remove(newData.key(), currentData); 181 + if (currentData != null) {
182 + currentMap.remove(newData.key(), currentData);
183 + } else {
184 + log.info("Gratuitous purge request for intent: {}", newData.key());
185 + }
182 } else { 186 } else {
183 currentMap.put(newData.key(), new IntentData(newData)); 187 currentMap.put(newData.key(), new IntentData(newData));
184 } 188 }
......