-
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
Source from IAsyncEnumerable is not disposed on shutdown, while interrupted because of back-pressure #6903
Comments
Thanks for the detailed reproduction - we'll look into this. |
@Aaronontheweb I peeked at this...
The problem with this pattern is that in my experience it is possible for the task to complete successfully between the On the plus side, getting rid of the fast fail path shouldn't be that harmful in the grand scheme of things. Back to this specific issue, I think I see what's going on, we'll need to be a little clever in handling this but I think the logic from I'll see what I can do this weekend or next week. |
Version Information
1.5.12
Akka, Akka.Streams
Describe the bug
Assume stream composed of following:
IAsyncEnumerable<>
.When:
Then:
IAsyncEnumerable<>
does not complete enumeration, leaving any resource allocated withing the enumerator not disposed. In my case this would be EF CoreDbContext
constructed viaIDbContextFactory<>
.To Reproduce
Links to working reproductions on Github / Gitlab are very much appreciated
Expected behavior
Async enumerator should be either disposed, or maybe awaited next via
MoveNextAsync
with cancellation triggered, so that enumerator is correctly completed. Resources allocated within enumerator are thus correctly disposed.Actual behavior
Async enumerator is left uncompleted. Resources allocated within enumerator are not disposed.
Screenshots
Interrupted enumerator:
Completed enumerator:
Environment
All environments are impacted.
Additional context
Disposal of the stream was removed previously by #6290, related to #6280.
The text was updated successfully, but these errors were encountered: