Committed by
Gerrit Code Review
ONOS-2381 Fixing intent purge command
We need to remove the current value. Change-Id: Ib15f9b097e3df096b45367012d067973436e1d85
Showing
2 changed files
with
2 additions
and
1 deletions
| ... | @@ -281,6 +281,7 @@ public class IntentData { //FIXME need to make this "immutable" | ... | @@ -281,6 +281,7 @@ public class IntentData { //FIXME need to make this "immutable" |
| 281 | return true; | 281 | return true; |
| 282 | 282 | ||
| 283 | case PURGE_REQ: | 283 | case PURGE_REQ: |
| 284 | + // TODO we should enforce that only WITHDRAWN intents can be purged | ||
| 284 | return true; | 285 | return true; |
| 285 | 286 | ||
| 286 | case COMPILING: | 287 | case COMPILING: | ... | ... |
| ... | @@ -180,7 +180,7 @@ public class GossipIntentStore | ... | @@ -180,7 +180,7 @@ public class GossipIntentStore |
| 180 | // Only the master is modifying the current state. Therefore assume | 180 | // Only the master is modifying the current state. Therefore assume |
| 181 | // this always succeeds | 181 | // this always succeeds |
| 182 | if (newData.state() == PURGE_REQ) { | 182 | if (newData.state() == PURGE_REQ) { |
| 183 | - currentMap.remove(newData.key(), newData); | 183 | + currentMap.remove(newData.key(), currentData); |
| 184 | } else { | 184 | } else { |
| 185 | currentMap.put(newData.key(), new IntentData(newData)); | 185 | currentMap.put(newData.key(), new IntentData(newData)); |
| 186 | } | 186 | } | ... | ... |
-
Please register or login to post a comment