spawn icon indicating copy to clipboard operation
spawn copied to clipboard

PurgeTimeout as a optional actor option

Open eliasdarruda opened this issue 2 years ago • 3 comments
trafficstars

We need to add a option that purges all data related with the actor, it will clean its state and delete the entry from the Statestore after a configured time.

It can be called PurgeTimeout, DestroyTimeout or something like that, open to suggestions on the naming pattern.

Should it de-register from all hosts too? @sleipnir WDYT?

eliasdarruda avatar Jan 20 '23 21:01 eliasdarruda

We need to add a option that purges all data related with the actor, it will clean its state and delete the entry from the Statestore after a configured time.

It can be called PurgeTimeout, DestroyTimeout or something like that, open to suggestions on the naming pattern.

Should it de-register from all hosts too? @sleipnir WDYT?

This is an old wish of mine. I think we have to keep a few things in mind when implementing this:

  1. We must stipulate a minimum default period for an actor without updating for more than N days to remain in the Statesstore. I would suggest 90 days.
  2. User can allow data to never be deleted (maybe this is the best option for Default timeout).
  3. We must consider the update date of the state, that is, the updated_at column
  4. I suggest that the configuration has a name that addresses the question of the Actor's non-usefulness. Something like purgeUnusedActors or something like that.
  5. The process responsible for validating and cleaning this up must also be global. Similar to what we do with the Schedule invocation

sleipnir avatar Jan 20 '23 21:01 sleipnir

ping @marcellanz

sleipnir avatar Jan 20 '23 21:01 sleipnir

@eliasdarruda we can add an option called ttl to the ActorSettings

sleipnir avatar Jul 31 '24 23:07 sleipnir