Making data streaming possible by moving the response future... #5116
Draft
daijithegeek wants to merge 3 commits intoeclipse-ee4j:2.xfrom
Draft
Making data streaming possible by moving the response future... #5116daijithegeek wants to merge 3 commits intoeclipse-ee4j:2.xfrom
daijithegeek wants to merge 3 commits intoeclipse-ee4j:2.xfrom
Conversation
…back completion right after headers are received. All necessary information is present there to ensure proper Jersey handling of the content. This implementation generates an unwanted deadlock though.
…t JettyConnector implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
... and callback completion right after headers are received.
All necessary information is present to ensure proper Jersey handling of the content.
Jetty client is perfectly able to stream data on-the-fly. But current Connector implementation awaits completion.
I've tested with ApacheConnector; it streams data correctly.
Unfortunately, the callback change generates an unwanted deadlock when reading an entity through a MessageBodyReader in org.glassfish.jersey.client.JerseyInvocation#translate.
The entity reading seems to be triggered by calling the response callback.
The Jetty thread does the call when using async(), but since it is also the one pushing contents to the buffer, the result is a deadlock.