BUG-7033: Remove payload replication short-circuits 71/49971/2
authorTom Pantelis <tpanteli@brocade.com>
Tue, 3 Jan 2017 12:53:08 +0000 (07:53 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 4 Jan 2017 12:12:16 +0000 (12:12 +0000)
commitc4f9bb0e408bfaff5c1730e574e8ef1ebe80ac7b
tree5ca4a653fb7291df975356630cf8cda7fc512af9
parent3a925aba9b5cb3b6e4af7f25f7b8e5420ced9498
BUG-7033: Remove payload replication short-circuits

Removed the code paths in ShardDataTree#startCommit whereby it
short-circuits the call to persistPayload. This simplifies the
code in ShardDataTree. For UNMODIFIED DataTreeCandidates we still
want to replicate so followers have an accurate view of transaction
states. For the case where persistence is disabled and there are no
followers, I modified persistPayload to check those conditions and
short-circuit.

Change-Id: Ifb940f950b076b5f9cedd91c42d3e065db92a7c5
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeMocking.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java