Fix InMemory shard transaction chaining. 30/45830/1
authorTomas Cere <tcere@cisco.com>
Fri, 9 Sep 2016 15:53:20 +0000 (17:53 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 19 Sep 2016 15:07:24 +0000 (17:07 +0200)
commitdca009bba2d4ceb2e13537f3ac6f9a5f1b05302f
treea182a5e4a2a497e0a1e205eb0c039751d348ae77
parent395348596fcc6296e1a9ed0d9899b5aa16f08625
Fix InMemory shard transaction chaining.

In case we had multiple transactions going after each other quickly
the next transaction might not observe the state of the previous transaction yet.
Fix this by reusing the DataTreeModification of the previous transaction.
Also introduce state transitions into InMemoryDOMDataTreeProducer so it
behaves more like a transaction chain.

Change-Id: I96c746c1b91ac9f6b87152dca612094c73c23387
Signed-off-by: Tomas Cere <tcere@cisco.com>
(cherry picked from commit 7d8e59521efbfadd55de34f645db8a8692de6564)
14 files changed:
dom/mdsal-dom-broker/src/main/java/org/opendaylight/mdsal/dom/broker/ShardedDOMDataTreeProducer.java
dom/mdsal-dom-broker/src/main/java/org/opendaylight/mdsal/dom/broker/ShardedDOMDataTreeWriteTransaction.java
dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/ShardedDOMDataTreeTest.java
dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShard.java
dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShardProducer.java
dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/InmemoryDOMDataTreeShardWriteTransaction.java
dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/ShardCommitCoordinationTask.java
dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/ShardSubmitCoordinationTask.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShardProducerTest.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShardTest.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShardThreePhaseCommitCohortTest.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InmemoryDOMDataTreeShardWriteTransactionTest.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/ShardCommitCoordinationTaskTest.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/ShardSubmitCoordinationTaskTest.java