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

Making data streaming possible by moving the response future... #5116

Draft
wants to merge 3 commits into
base: 2.x
Choose a base branch
from

Conversation

daijithegeek
Copy link
Contributor

@daijithegeek daijithegeek commented Aug 4, 2022

... 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.

…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.
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.

None yet

1 participant