5 ms·
So a problem I noticed, is you pass mutable state to the actor. What happens if the actor mutates the state then fails? Do you just dirty the state and throw
by jkbbwr 4y ago
So a problem I noticed, is you pass mutable state to the actor.
What happens if the actor mutates the state then fails?
Do you just dirty the state and throw it away or do you retry at all?
- snowboarder63 4y agoIf the actor fails, it could have failed mid-mutation so we can't trust the "state" object. This would be the same if we passed in an owned state (rather than a mutable reference) and the handler didn't reply with a new state object. If a failure happens, the state is dropped there too (in Rust). I know it's not exactly how Erlang handles it, but it's a tradeoff we've accepted in this case. We're open to suggestions however!