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

ArrayIndexOutOfBoundsException when buffer gets full and isn't flushed properly #35

Closed
evilzombieszack opened this issue Oct 20, 2010 · 3 comments

Comments

@evilzombieszack
Copy link

I got this exception from some tests I was running:

java.lang.ArrayIndexOutOfBoundsException: 8192
at redis.clients.util.RedisOutputStream.write(RedisOutputStream.java:37)
at redis.clients.jedis.Protocol.sendCommand(Protocol.java:24)
at redis.clients.jedis.Connection.sendCommand(Connection.java:60)
at redis.clients.jedis.Jedis.get(Jedis.java:54)

Looking at the code, I'm thinking maybe the Jedis client isn't thread-safe, so there should be one instance per thread?

thanks for any feedback,
-Z

@xetorthio
Copy link
Contributor

Hi!
You are right, Jedis is not threadsafe. Please check in the Wiki, under "Using Jedis in a multithreaded environment" http://github.com/xetorthio/jedis/wiki

Let me know if you have further questions :)

@evilzombieszack
Copy link
Author

oops sorry about that. Should have RTFM.

@xetorthio
Copy link
Contributor

Hehehe, no problem. The wiki is pretty new :)

This issue was closed.
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

2 participants