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 JsonStreamParser.head[J] #36

Closed
wants to merge 1 commit into from

Conversation

mdedetrich
Copy link
Owner

Resolves: #15

@gchudnov I am trying to create a failing test for this usecase, specifically a lazy streamed chunked http response (in response to what you wrote in the issue) and I am not having much luck. Would it be possible to help out here, i.e. do you have some idea of the JSON content that was causing the problem or maybe it was another issue (i.e. the chunks were coming in extremely slowly???)

@mdedetrich
Copy link
Owner Author

Okay so I think I may have gotten somewhere, i.e. if I add a .delay(10.seconds) to the Source that provides the chunked data then I get empty head of list, I guess there is some timeout going on here.

Lets see if I can reproduce this in akka-streams JSON to see if behaviour is the same or different.

@mdedetrich
Copy link
Owner Author

mdedetrich commented Nov 4, 2023

So annoying news, I put the exact same test into akka-streams-json (which is set to Akka 2.6.20 where you report that it worked) and its behaving the same way as Pekko.

@gchudnov I have a sneaking suspicion that there wasn't any behaviour change (I guess if there was it would have already been reported one way or another) but rather there were at some points in time really slow chunked responses? I can reproduce head of empty stream but not the source never completing/finishing even though I am doing Source.fromIterator(() => s.grouped(1) which means every single character is in its own chunk.

In any case the test is setup so you can play around with it to see if you can somehow reproduce the scenario (and more critically confirm if behaviour in akka-streams-json is different)

@gchudnov
Copy link

gchudnov commented Nov 4, 2023

@mdedetrich
Thank you for trying to reproduce it, I'll check soon

@gchudnov
Copy link

gchudnov commented Nov 5, 2023

hm.. indeed something tricky, trying to restore the code that was producing an error and reproduce.

@mdedetrich
Copy link
Owner Author

Closing due to #93

@mdedetrich mdedetrich closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with unmarshaling
2 participants