-
Notifications
You must be signed in to change notification settings - Fork 360
Description
I am encountering a sporadic issue with actor's state synchronization and would love any directions or insights
Overview
I have an actor that receives a stream of events (via pub-sub)
For each event it will update the actor's state and register a-reminder
When a-reminder triggers it reads the actor's state and starts processing, then persists the state and registers b-reminder to complete the processing
When b-reminder triggers it reads the actor's state and completes processing
Infra
- Dapr 1.15.4
dotnet-sdkfor all componentsrabbitmqas pub-sub backendpostgresqlas actor-state-store.
The issue
Sometimes I get the following flow:
event1received by actor,state1is persisted, anda-reminderis registereda-remindertriggers, readsstate1, unregisters itself, persistsstate1.1and registersb-reminderevent2received by actor,a-reminder&b-reminderare unregistered,state2is persisted, a newa-reminderis registereda-remindertriggers and reads the actor's state instead of the expectedstate2it getsstate1.1
(even more puzzling to me:event3received by actor and seesstate2in state store )
Worth noting that this is not consistent, sometimes the reminder will get the expected state2 even though execution order is the same
What I looked for?
- tried reproducing with a simpler setup and could not reproduce (yet)
- tried to lookup etag errors from state-store, didn't find anything
- tried to lookup any errors in dapr-sidecar, didn't find anything
- actor logs indicate serial execution of the above flow
Expected Behavior
State store should either indicate some ETag error on StateManager.SaveStateAsync() or consistently the latest save data should return upon StateManager.GetStateAsync
Actual Behavior
Inconsistent state is returned from different reminder invocations
Steps to Reproduce the Problem
Still trying to create a minimal reproduction
Release Note
N/A