Skip to content
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

Fix DeserializeAsyncEnumerable streaming behavior #56080

Merged

Conversation

eiriktsarpalis
Copy link
Member

Fixes regression introduced by #51702: the ContinueDeserialize method will return 'null' on partial reads so no elements will be yielded by the enumerator until the entire stream has been consumed.

This change reverts to the original implementation where the partially populated queue is being fetched from ReadStack instead.

Fixes #56055.

Fixes regression introduced by dotnet#51702: the ContinueDeserialize method will return 'null' on partial reads so no elements will be yielded by the enumerator until the entire stream has been consumed.

This change reverts to the original implementation where the partially populated queue is being fetched from the ReadStack instead.
@ghost
Copy link

ghost commented Jul 21, 2021

Tagging subscribers to this area: @eiriktsarpalis, @layomia
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes regression introduced by #51702: the ContinueDeserialize method will return 'null' on partial reads so no elements will be yielded by the enumerator until the entire stream has been consumed.

This change reverts to the original implementation where the partially populated queue is being fetched from ReadStack instead.

Fixes #56055.

Author: eiriktsarpalis
Assignees: eiriktsarpalis
Labels:

area-System.Text.Json

Milestone: 6.0.0

@karelz
Copy link
Member

karelz commented Jul 21, 2021

Http3_MsQuic test failures are tracked in #56090. Should be fixed and merged shortly. Sorry for the inconvenience!

@eiriktsarpalis eiriktsarpalis merged commit 0a3e317 into dotnet:main Jul 22, 2021
@eiriktsarpalis eiriktsarpalis deleted the fix-json-asyncenumerable-bug branch July 22, 2021 20:29
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question About JsonSerializer.DeserializeAsyncEnumerable Behavior
3 participants