Committed by
Gerrit Code Review
ONOS-4656 Addressing issue where intents get stuck in PURGE_REQ state.
Change-Id: I223ff14856fadb8d6e913883b42a5e53bbbbc6db
Showing
1 changed file
with
6 additions
and
2 deletions
... | @@ -176,8 +176,12 @@ public class GossipIntentStore | ... | @@ -176,8 +176,12 @@ public class GossipIntentStore |
176 | if (IntentData.isUpdateAcceptable(currentData, newData)) { | 176 | if (IntentData.isUpdateAcceptable(currentData, newData)) { |
177 | // Only the master is modifying the current state. Therefore assume | 177 | // Only the master is modifying the current state. Therefore assume |
178 | // this always succeeds | 178 | // this always succeeds |
179 | - if (newData.state() == PURGE_REQ && currentData != null) { | 179 | + if (newData.state() == PURGE_REQ) { |
180 | - currentMap.remove(newData.key(), currentData); | 180 | + if (currentData != null) { |
181 | + currentMap.remove(newData.key(), currentData); | ||
182 | + } else { | ||
183 | + log.info("Gratuitous purge request for intent: {}", newData.key()); | ||
184 | + } | ||
181 | } else { | 185 | } else { |
182 | currentMap.put(newData.key(), new IntentData(newData)); | 186 | currentMap.put(newData.key(), new IntentData(newData)); |
183 | } | 187 | } | ... | ... |
-
Please register or login to post a comment