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

BufferUnderflowException thrown when fetching data #4

Open
ud3sh opened this issue Jul 24, 2016 · 1 comment
Open

BufferUnderflowException thrown when fetching data #4

ud3sh opened this issue Jul 24, 2016 · 1 comment

Comments

@ud3sh
Copy link

ud3sh commented Jul 24, 2016

A BufferUnderflowException occurs intermittently when decoding the response string in RESPDecoder. The orginal cause of the issue seems to be in RedisSocketIO#sendRaw. In particular, the following exit condition on the while loop is incorrect
while(this.fromServerSocket.ready() || sb.length() == 0)
this.fromServerSocket.ready() could evaluate to false even when there are more bytes available in the response. This leads to the following exception in RESPDecoder because there are less bytes available than expected (as specified in the first line of the response)

java.nio.BufferUnderflowException
    at java.nio.CharBuffer.get(CharBuffer.java:688)
    at java.nio.CharBuffer.get(CharBuffer.java:715)
    at br.com.svvs.jdbc.redis.RESPDecoder.parseBulkString(RESPDecoder.java:57)
@ud3sh
Copy link
Author

ud3sh commented Aug 25, 2016

Should be fixed by pull request #5

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

No branches or pull requests

1 participant