For GDPR reasons, I need to ensure that I don't store customer data which I no longer need. When looking at Service Fabric Actors, I am uncertain what "garbage collection" really means.
[StatePersistence(StatePersistence.Persisted)]
internal class Actor1 : Actor, IActor1
{
public Actor1(ActorService actorService, ActorId actorId)
: base(actorService, actorId)
{
}
public Task PingAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
IActorService actorServiceProxy = ActorServiceProxy.Create(
new Uri("fabric:/MyApp/MyActorService"), partitionKey);
// ...
do
{
PagedResult<ActorInformation> page = await actorServiceProxy.GetActorsAsync(continuationToken, cancellationToken);
// ...
When enumerating actor instances in a test environment, it seemed to me like actor information was kept for at least 2 months, even though the actors did not have any stored state.
I found multiple articles mentioning that I will need to delete the actors manually if they have leftover state, but in my case the only "state" would be the fact that the actorId "exists". If I were to use something sensitive like a user email address as an actorId, would Service Fabric ever delete the information about the actorId by itself?