nullcheck
nullcheck

Reputation: 1

Best practice for cleaning up EntityStoppedManifest journal entries for permanently terminated actors?

In our actor system, using sharding and persistence, the concrete instances of one of our ReceivePersistentActor implementations are not re-used once they are terminated (passivated), as they represent client sessions identified by a GUID that is generated for each new session.

When a session ends, the ReceivePersistentActor is responsible for cleaning up it's own persistence data and will call DeleteSnapshots and DeleteMessages, which works fine. Once these calls have been processed, the actor will Context.Parent.Tell(new Passivate(PoisonPill.Instance)); to terminate. After that, the event journal will still contain an EntityStoppedManifest entry ("CD"), as this is generated through the Passivate message. Over time this will lead to many "CD" entries remaining in the event journal.

Is there a recommended approach for cleaning up such residue entries?
Maybe a separate Janitor actor that cleans up these entries manually?
Or is this even a design flaw on our end?

Upvotes: 0

Views: 75

Answers (1)

nullcheck
nullcheck

Reputation: 1

Looks like I came here too hastily, as those events have been mostly cleaned up by now automagically.

What might have been the issue for those events to accumulate in such high numbers in the first place was that these events had been generated during actor recovery instead of during normal operation. But this is just an assumption.

Upvotes: 0

Related Questions