Thomas Vachuska
Committed by Gerrit Code Review

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

Change-Id: I223ff14856fadb8d6e913883b42a5e53bbbbc6db
......@@ -176,9 +176,13 @@ public class GossipIntentStore
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) {
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));
}
......