title: Understanding service fabric actor deletion
body: <p>I am running a local 5 node service fabric cluster.<br/>
  In order to have finer control over long running actors, I want to delete the actors when required.<br/>
  Referring to the documentation for <a href="https://azure.microsoft.com/en-in/documentation/articles/service-fabric-reliable-actors-lifecycle/#_deleting-actors-and-their-state" rel="nofollow" title="deleting actors">deleting actors</a> and <a href="https://azure.microsoft.com/en-in/documentation/articles/service-fabric-reliable-actors-platform/#_enumerating-actors" rel="nofollow" title="enumerating actors">enumerating actors</a> I came up with the following code<br/></p>
  
  <pre><code>//create actor ID, get instance and call a method on the actor
  ActorId id = ActorId.CreateRandom();
  IActor1 myActor = ActorProxy.Create&lt;IActor1&gt;(id, new Uri(URI));
  Console.WriteLine(myActor.GetCountAsync().GetAwaiter().GetResult() + "ActorID:" + id.GetPartitionKey());
  IActorService myActorServiceProxy = ActorServiceProxy.Create(new Uri(URI), id);
  
  //delete actor from Actor service
  myActorServiceProxy.DeleteActorAsync(id, new CancellationToken()).GetAwaiter().GetResult();
  
  //enumerate actors
  IActorService actorServiceProxy = ActorServiceProxy.Create(new Uri(URI), id.GetPartitionKey());
  
  ContinuationToken continuationToken = null;
  List&lt;ActorInformation&gt; activeActors = new List&lt;ActorInformation&gt;();
  
  do
  {
    PagedResult&lt;ActorInformation&gt; page = actorServiceProxy
                 .GetActorsAsync(continuationToken, new CancellationToken()).GetAwaiter().GetResult();
  
    activeActors.AddRange(page.Items.Where(x =&gt; x.IsActive));
  
    continuationToken = page.ContinuationToken;
  }
  while (continuationToken != null);
  foreach(ActorInformation info in activeActors)
  {
     Console.WriteLine("INFO:" + info.ActorId + ":" + info.IsActive);
  }
  
  //call the method again
  Console.WriteLine(myActor.GetCountAsync().GetAwaiter().GetResult() + "ActorID:" + id.GetLongId());
  </code></pre>
  
  <p>And the output that I get is<br/>
  <code>0ActorID:1952475710829467062
  0ActorID:1952475710829467062</code></p>
  
  <p>where 0 is the return value of the method.<br/>
  I understand that the actor has been deleted from the service as nothing was printed in the foreach loop, but how did my second call to the actor method succeed if the actor was deleted? Was it recreated? Please do help me out in understanding that.</p>