Make sure transaction applies whole removal list
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / impl / HashMapDataStore.xtend
index 5fc2c1d..9600881 100644 (file)
@@ -64,15 +64,15 @@ class HashMapDataStore implements DataStore, AutoCloseable {
 
     def RpcResult<Void> finish(HashMapDataStoreTransaction transaction) {
         val modification = transaction.modification;
-        configuration.putAll(modification.updatedConfigurationData);
-        operational.putAll(modification.updatedOperationalData);
-
         for (removal : modification.removedConfigurationData) {
             remove(configuration,removal);
         }
         for (removal : modification.removedOperationalData) {
             remove(operational,removal);
         }
+        configuration.putAll(modification.updatedConfigurationData);
+        operational.putAll(modification.updatedOperationalData);
+
         return Rpcs.getRpcResult(true, null, Collections.emptySet);
     }