Bug 3206: CDS - issues with direct commit 71/20271/9
authorTom Pantelis <tpanteli@brocade.com>
Wed, 13 May 2015 11:44:01 +0000 (07:44 -0400)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 21 May 2015 12:52:29 +0000 (12:52 +0000)
commitcf088cc87d5e9c0dfd3fb8e47e0d6d7c5ddc19fd
tree561f9db66927a91513694334f122f9841edb0215
parent37a5dd4bdd5d0eda6afa0762b42b94762e969956
Bug 3206: CDS - issues with direct commit

Modified RaftActor#persistData to send the ApplyState message instead of
calling applyState directly in case the Shard tries to persist another
entry during the persist callback.

Modified Shard to use the correct sneder to send the
CommitTransactionReply message.

The third fix is to ensure direct commits in a chain aren't committed
before previous coordinated commits. In the ShardCommitCoordinator, I
changed it to enqueue all CohortEntries when they are readied so they
are processed in that order.

I also included the unit test scenario that caused the issues to occur.

Change-Id: I65ffcbbac37d6be28c4e1c2dc17d3b0ca21847dc
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
17 files changed:
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogImpl.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContext.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContextSupport.java
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/ShardCommitCoordinator.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/DatastoreConfigurationMXBean.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/DatastoreConfigurationMXBeanImpl.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java
opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java
opendaylight/md-sal/sal-distributed-datastore/src/test/resources/odl-datastore-test.yang