Fix CloseTransactionChain NotSerializableException 86/18886/2
authorTom Pantelis <tpanteli@brocade.com>
Wed, 22 Apr 2015 16:42:03 +0000 (12:42 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 23 Apr 2015 04:27:24 +0000 (00:27 -0400)
In a 3 node cluster, I created a Tx chain on a follower and, on closing
the chain, I saw a NotSerializableException for the
CloseTransactionChain message. CloseTransactionChain is serializable via
protobuff but TransactionChainProxy doesn't call toSerializable.

Change-Id: I09ed1d937f766b527c0e94d02fde2aa9cf4e5e37
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java

index 5531b5f5401676a13d02a08b69683a2f31ca077a..cf261cbd2af103b70f3dfce9885903a88ee293e6 100644 (file)
@@ -112,7 +112,7 @@ public class TransactionChainProxy implements DOMStoreTransactionChain {
         currentState = CLOSED_STATE;
 
         // Send a close transaction chain request to each and every shard
-        actorContext.broadcast(new CloseTransactionChain(transactionChainId));
+        actorContext.broadcast(new CloseTransactionChain(transactionChainId).toSerializable());
     }
 
     private ChainedTransactionProxy allocateWriteTransaction(TransactionProxy.TransactionType type) {