Forward pending transactions on leadership change 99/35199/9
authorTom Pantelis <tpanteli@brocade.com>
Mon, 22 Feb 2016 01:41:16 +0000 (20:41 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 24 Mar 2016 19:39:32 +0000 (19:39 +0000)
commit40460ae356add6bd8d28a25cf8b287c9bfa38b38
treefe8d580169220e7b169fb0d6f3d84f2049783ee3
parentb5e778befe870d280b8f7d16b862e7f306a243e3
Forward pending transactions on leadership change

If the current leader is deposed for some reason and it has pending
tx's, on leader change, the tx's will now be converted to
BatchedModifications messages and forwarded to the new leader in the
ready state so the new leader can complete the commits. Previously
they were aborted and failed.

In addition, if there's a current transaction that had already been
canCommitted and possibly preCommitted, CanCommitTransaction and
CommitTransaction messages will also be sent to the new leader appropriately.

Change-Id: I9bbd68856586c15464f4ca0e844f040c6bb5f30a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ChainedCommitCohort.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/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/DistributedDataStoreRemotingIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java