Fix GossipIntentStore purge logic to ignore purge requests for non-existent intent data
Change-Id: Ie5083ca7096bcdf1f94e80fe88d9ef65ac0f2420
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -176,7 +176,7 @@ public class GossipIntentStore | ... | @@ -176,7 +176,7 @@ 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) { | 179 | + if (newData.state() == PURGE_REQ && currentData != null) { |
180 | currentMap.remove(newData.key(), currentData); | 180 | currentMap.remove(newData.key(), currentData); |
181 | } else { | 181 | } else { |
182 | currentMap.put(newData.key(), new IntentData(newData)); | 182 | currentMap.put(newData.key(), new IntentData(newData)); | ... | ... |
-
Please register or login to post a comment