Bug 509: Fixed incorrect merging of Data Store Writes / Events 17/6217/2
authorTony Tkacik <ttkacik@cisco.com>
Tue, 15 Apr 2014 15:48:56 +0000 (17:48 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Tue, 15 Apr 2014 16:28:40 +0000 (18:28 +0200)
commit0c108e1b6b108b55b79c5b6dcdb0b4261ac510ba
tree7931ea8a0a1efc28512546e005f2e6769981720c
parent0afde20cdabcedb2bd8ddd1d59d12d3a5669600b
Bug 509: Fixed incorrect merging of Data Store Writes / Events

ForwardedBackwardsCompatibleDataBroker:

In old Data API only way to replace element was to use
remove/put combination, which changed with new Async DOM Broker
APIs where put is actually add/replace so previous delete is not
neccessary.

BackwardsCompatibleTransaction keeps track of such remove/put
operations and propagates put-only to new Async Data Transaction.

DOMImmutableDataChangeEvent:

Builder for DOMImmutableDataChange event used ImmutableMap builder
which throws IllegalArgumentException when same key/value combo
is overriden, which made impossible to merge some events. Switched
Builder implementation to use combination of HashMap and
ImmutableMap.copyOf() in order to prevent this
IllegalArgumentException to fail commit process.

Change-Id: I935bd4f5499c26190c52adcaee1df6335640bfaf
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/ForwardedBackwardsCompatibleDataBroker.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/DOMImmutableDataChangeEvent.java