A bunch of miscellaneous services to get Distributed Data Store ready for deployment
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ThreePhaseCommitCohort.java
index 00d4ab5782e3e7f0a365bdd9ace5be917b423dc1..b10bf1d9fc6b3a353a68c55d960c5955f5323aa1 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.controller.cluster.datastore;
 
 import akka.actor.ActorRef;
+import akka.actor.PoisonPill;
 import akka.actor.Props;
 import akka.actor.UntypedActor;
 import akka.event.Logging;
@@ -55,6 +56,7 @@ public class ThreePhaseCommitCohort extends UntypedActor {
         });
     }
 
+
     @Override
     public void onReceive(Object message) throws Exception {
         log.debug("Received message {}", message);
@@ -94,6 +96,8 @@ public class ThreePhaseCommitCohort extends UntypedActor {
         shardActor.forward(new ForwardedCommitTransaction(cohort, modification),
             getContext());
 
+        getContext().parent().tell(PoisonPill.getInstance(), getSelf());
+
     }
 
     private void preCommit(PreCommitTransaction message) {