-
Notifications
You must be signed in to change notification settings - Fork 18
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
Dropping pubsub event in the logs #520
Comments
I started to look at this, but it is not as easy as first thought. This was introduced in #345 and the reason is important for correctness. I thought we could track that no events at all have arrived and therefore safely accept the incoming event because of the idle situation. However, then when second event arrives we are in the same situation until the backtracking event arrives. We don't know for how long we could just continue accepting pubsub events because then we could violate the reason for the "to far ahead" check. This only happens if there are no events at all for a duration longer than the backtracking window, so it should be a rare situation. Increasing the backtracking window could be a way to mitigate it for a low throughput system. Pubsub should only be seen as an optimization, not a replacement for the refresh interval. There can always be situations where the latency goes up to the refresh interval. With that conclusion I don't think we can do anything about this, unless someone has a brilliant suggestion? |
Hmm, I thought that pubsub is used just to trigger the standard query to DB for a new events (I mean that no event is sent via pubsub). So maybe we can trigger this query in case "too far ahead" check is positive (the one that is done with |
No, that's the Cassandra plugin. For r2dbc we send the events and they are processed without addition query if sequence numbers and such line up with expectations.
That might work as a fallback. I'll take a look at if we can trigger more frequent query based on that. |
That would be nice, thanks! |
Description is here: https://discuss.lightbend.com/t/akka-persistence-r2dbc-pubsub-event-dropped/10619
Versions used
akka-persistence-r2dbc 1.5.2
Akka version: 2.9.1
Expected Behavior
Event is processed by projection right after pubsub event is received.
Actual Behavior
Event is processed by projection with a delay.
Relevant logs
https://discuss.lightbend.com/t/akka-persistence-r2dbc-pubsub-event-dropped/10619
The text was updated successfully, but these errors were encountered: