New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document: calling persist() in Futures is bad #21689
Comments
|
|
Sounds interesting. Do you have a reproducer? |
Working on a reproducer. |
Yes, that is not allowed. Must be done in the actor's receive thread. Pipe the result of the future back to the actor and persist from receiveCommand |
Not a bug IMHO if persist() was called from a Future, incorrect usage though. |
When testing a persistent actor with a low throughput (one command at a time) event sometimes get "stuck" and are not processes until the next command is sent.
I suspect that it has to do with batching in EventSourced - events get batched before being sent to the persistent store. FlushBatch is getting called inside aroundReceiveComplete, which explains why the batch gets flushed when the 2nd command is sent.
Is there a way to tune, or turn off batching?
The text was updated successfully, but these errors were encountered: