-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Akka Persistence Throwing Unobserved Task Exception #7358
Comments
@stedmanm thanks for reporting this! We'll look into it |
A fix to this issue will have a very high knock on effect. To fix this effectively, we'd need to implement cancellation token to all journal/snapshot database related methods to effectively signal a cancellation to the underlying task. That means implementing methods supporting cancellation tokens to ALL public async API methods that is also backward compatible, this will be a binary breaking change for all persistence plugins. |
This is an actual bug, here is a simple reproduction to illustrate this: https://share.linqpad.net/pbjjq82i.linq An |
# Conflicts: # src/core/Akka.Persistence/Snapshot/SnapshotStore.cs
Version Information
Version of Akka.NET? 1.5.28
Which Akka.NET Modules? Akka.Persistence
Describe the bug
Bug appears to be in method CallThrough of class AtomicState. If WaitAsync(Timeout timeout) completes before the task implemented by SnapshotStore/Journal, and the task in question throws an exception, then this exception will become unobserved.
To Reproduce
Expected behavior
Would expect Akka framework to observe exception thrown by SnapshotStore/Journal.
Actual behavior
Causes unobserved task exception and crashes our service.
Screenshots
Environment
Windows Service and .NET 7
The text was updated successfully, but these errors were encountered: