Committed by
Ray Milkey
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
... | @@ -177,7 +177,7 @@ public class GossipIntentStore | ... | @@ -177,7 +177,7 @@ 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) { | 180 | + if (newData.state() == PURGE_REQ && currentData != null) { |
181 | currentMap.remove(newData.key(), currentData); | 181 | currentMap.remove(newData.key(), currentData); |
182 | } else { | 182 | } else { |
183 | currentMap.put(newData.key(), new IntentData(newData)); | 183 | currentMap.put(newData.key(), new IntentData(newData)); | ... | ... |
-
Please register or login to post a comment