Fix shard deadlock in 3 nodes
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ShardWriteTransaction.java
index dc77b290c9b54f9a106d92d9531c040438dec3ef..b3f4b0b0d6d1f28f669b3fb48cfb02002447b1d7 100644 (file)
@@ -77,7 +77,7 @@ public class ShardWriteTransaction extends ShardTransaction {
                             totalBatchedModificationsReceived, batched.getTotalMessagesSent()));
                 }
 
-                readyTransaction(false, batched.isDoCommitOnReady(), batched.getVersion());
+                readyTransaction(batched);
             } else {
                 getSender().tell(new BatchedModificationsReply(batched.getModifications().size()), getSelf());
             }
@@ -109,13 +109,13 @@ public class ShardWriteTransaction extends ShardTransaction {
         }
     }
 
-    private void readyTransaction(boolean returnSerialized, boolean doImmediateCommit, short clientTxVersion) {
+    private void readyTransaction(BatchedModifications batched) {
         TransactionIdentifier transactionID = getTransactionId();
 
         LOG.debug("readyTransaction : {}", transactionID);
 
-        getShardActor().forward(new ForwardedReadyTransaction(transactionID, clientTxVersion,
-                transaction, doImmediateCommit), getContext());
+        getShardActor().forward(new ForwardedReadyTransaction(transactionID, batched.getVersion(),
+                transaction, batched.isDoCommitOnReady(), batched.getParticipatingShardNames()), getContext());
 
         // The shard will handle the commit from here so we're no longer needed - self-destruct.
         getSelf().tell(PoisonPill.getInstance(), getSelf());