Fix forwarding in Shard.handleBatchedModifications 21/35121/6
authorTom Pantelis <tpanteli@brocade.com>
Fri, 19 Feb 2016 21:40:52 +0000 (16:40 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 18 Mar 2016 19:56:15 +0000 (19:56 +0000)
commit26721a6f2bc3ce4d524ccb562d7e7a38b4b76068
tree0ea715b23734c8361758bc6e491fa386b3fd7f66
parentf2b5692224570e7ecccb139594ed55237efeec03
Fix forwarding in Shard.handleBatchedModifications

Addressed the TODO in Shard.handleBatchedModifications to handle the
case where the BatchedModifications is not the first batch when leadership
changes and the BatchedModifications needs to be forwarded to the new
leader. Added code in ShardCommitCoordinator to reconstruct all previous
BatchedModifications messages, if needed, from the transaction
DataTreeModification, honoring the max batched modification count.

Change-Id: I4fecb71be91aee24072086e1565437a69c20c8d9
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/ShardCommitCoordinator.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadyLocalTransactionSerializer.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/AbstractBatchedModificationsCursor.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java