Yuta HIGUCHI

IntentStores: only post Parking states

Change-Id: I7ed3f2e38d71b5a5f83a47d582326576b7da52f1
...@@ -451,10 +451,10 @@ public class DistributedIntentStore ...@@ -451,10 +451,10 @@ public class DistributedIntentStore
451 builder.put(STATES_TABLE, strIntentId(intent.id()), serializer.encode(newState)); 451 builder.put(STATES_TABLE, strIntentId(intent.id()), serializer.encode(newState));
452 if (PARKING.contains(newState)) { 452 if (PARKING.contains(newState)) {
453 transitionedToParking.add(intent.id()); 453 transitionedToParking.add(intent.id());
454 + events.add(IntentEvent.getEvent(newState, intent));
454 } else { 455 } else {
455 transitionedToParking.remove(intent.id()); 456 transitionedToParking.remove(intent.id());
456 } 457 }
457 - events.add(IntentEvent.getEvent(newState, intent));
458 break; 458 break;
459 459
460 case SET_INSTALLABLE: 460 case SET_INSTALLABLE:
......
...@@ -490,8 +490,8 @@ public class HazelcastIntentStore ...@@ -490,8 +490,8 @@ public class HazelcastIntentStore
490 490
491 if (PARKING.contains(newState)) { 491 if (PARKING.contains(newState)) {
492 transientStates.remove(intentId); 492 transientStates.remove(intentId);
493 - }
494 events.add(IntentEvent.getEvent(newState, intent)); 493 events.add(IntentEvent.getEvent(newState, intent));
494 + }
495 495
496 log.trace("{} - {} -> {}", intentId, prevIntentState, newState); 496 log.trace("{} - {} -> {}", intentId, prevIntentState, newState);
497 // TODO sanity check and log? 497 // TODO sanity check and log?
......