Bail faster on not found module
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ShardWriteTransaction.java
index ee61090eeabf433218a2726fdeb6bf7557fce430..b3f4b0b0d6d1f28f669b3fb48cfb02002447b1d7 100644 (file)
@@ -23,7 +23,7 @@ import org.opendaylight.controller.cluster.datastore.modification.Modification;
 /**
  * Actor for a shard write-only transaction.
  *
- * @author: syedbahm
+ * @author syedbahm
  */
 public class ShardWriteTransaction extends ShardTransaction {
 
@@ -33,7 +33,7 @@ public class ShardWriteTransaction extends ShardTransaction {
 
     public ShardWriteTransaction(ReadWriteShardDataTreeTransaction transaction, ActorRef shardActor,
             ShardStats shardStats) {
-        super(shardActor, shardStats, transaction.getId());
+        super(shardActor, shardStats, transaction.getIdentifier());
         this.transaction = transaction;
     }
 
@@ -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) {
-        TransactionIdentifier transactionID = getTransactionID();
+    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());