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

Make sure messages are fully read even in case of EOS markers. #11768

Merged
merged 1 commit into from Jun 30, 2015

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Jun 18, 2015

When using compression over the network, you might sometimes see warnings that
the stream was not fully read. This is because DeflaterOutputStream adds an
end-of-stream marker. When deserializing, we need to poll for one byte using
InputStream.read() to make sure to decode this EOS marker.

For the record, it does not strike all the time today because we perform
buffering when decompressing to avoid performing too many JNI calls, but it
is easy to make this warning happen all the time by decreasing the size of
the buffer we use.

Close #11748

When using compression over the network, you might sometimes see warnings that
the stream was not fully read. This is because DeflaterOutputStream adds an
end-of-stream marker. When deserializing, we need to poll for one byte using
InputStream.read() to make sure to decode this EOS marker.

For the record, it does not strike all the time today because we perform
buffering when decompressing to avoid performing too many JNI calls, but it
is easy to make this warning happen all the time by decreasing the size of
the buffer we use.

Close elastic#11748
@jpountz jpountz added v2.0.0-beta1 review :Distributed/Network Http and internode communication implementations labels Jun 18, 2015
@rjernst
Copy link
Member

rjernst commented Jun 18, 2015

LGTM

@s1monw
Copy link
Contributor

s1monw commented Jun 22, 2015

LGTM too @kimchy can you take one more look here pls

@kimchy
Copy link
Member

kimchy commented Jun 22, 2015

LGTM

@clintongormley
Copy link

@jpountz can we get this in?

jpountz added a commit that referenced this pull request Jun 30, 2015
Make sure messages are fully read even in case of EOS markers.
@jpountz jpountz merged commit ed561cd into elastic:master Jun 30, 2015
@jpountz jpountz deleted the fix/stream_eos branch June 30, 2015 07:01
@kevinkluge kevinkluge removed the review label Jun 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Network Http and internode communication implementations >enhancement v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants