问题
I'm wondering whether there is anything stored/managed in Service Fabric for a non-activated actor without persistent state?
Let's say that an actor instance has the following life cycle:
- Actor is activated for the first time.
- Actor save state (persistent and replicated).
- Actor remove all saved state.
- Actor is deactivated (GC).
Is there anything left now? Is it like we would have deleted it instead?
回答1:
If you call IActorService.GetActorsAsync
you will still get that actor in the list, so yes, something (a marker value) is left in the storage provider. If the StatePersistence
is not set to Persisted
, like all other state it may get lost if you turn off the machines, for example.
来源:https://stackoverflow.com/questions/38633751/is-removing-all-actor-state-eventually-the-same-as-deleting-the-actor