spawn
spawn copied to clipboard
PurgeTimeout as a optional actor option
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?
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:
- 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.
- User can allow data to never be deleted (maybe this is the best option for Default timeout).
- We must consider the update date of the state, that is, the updated_at column
- 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.
- The process responsible for validating and cleaning this up must also be global. Similar to what we do with the Schedule invocation
ping @marcellanz
@eliasdarruda we can add an option called ttl to the ActorSettings