Kill Dynamic Actors when we're done with them
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ThreePhaseCommitCohort.java
index 00d4ab5782e3e7f0a365bdd9ace5be917b423dc1..e6adfbee660669afd0889995c5e4ec0c755810e9 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;
@@ -94,6 +95,8 @@ public class ThreePhaseCommitCohort extends UntypedActor {
         shardActor.forward(new ForwardedCommitTransaction(cohort, modification),
             getContext());
 
+        getContext().parent().tell(PoisonPill.getInstance(), getSelf());
+
     }
 
     private void preCommit(PreCommitTransaction message) {