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
5 additions
and
1 deletions
... | @@ -177,9 +177,13 @@ public class GossipIntentStore | ... | @@ -177,9 +177,13 @@ 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 | + if (currentData != null) { | ||
181 | currentMap.remove(newData.key(), currentData); | 182 | currentMap.remove(newData.key(), currentData); |
182 | } else { | 183 | } else { |
184 | + log.info("Gratuitous purge request for intent: {}", newData.key()); | ||
185 | + } | ||
186 | + } else { | ||
183 | currentMap.put(newData.key(), new IntentData(newData)); | 187 | currentMap.put(newData.key(), new IntentData(newData)); |
184 | } | 188 | } |
185 | 189 | ... | ... |
-
Please register or login to post a comment