mtpettyp / jdbc-redis Goto Github PK
View Code? Open in Web Editor NEWJDBC driver for Redis
JDBC driver for Redis
What steps will reproduce the problem?
1. Create a prepared statement like the following:
PreparedStatement prepStatement = conn.prepareStatement("set ? ?");
2. Use the prepStatement in a loop:
for(int i = 0; i < numberOfOperations; ++i) {
prepStatement.setString(1, "jdbc-redis-key-prepared-" + i);
prepStatement.setInt(2, i);
prepStatement.execute();
}
3. check your redis-server with KEYS *
What is the expected output? What do you see instead?
This should have written *numberOfOperations* keys but it only writes one key.
What version of the product are you using? On what operating system?
I'm running on Ubuntu 9.09 and I'm using jdbc-redis_0.1-beta.jar
Please provide any additional information below.
I found out about this while writing some code to benchmark jdbc-redis. The
benchmark code can be found here: http://pastie.org/635885
Original issue reported on code.google.com by [email protected]
on 29 Sep 2009 at 10:47
What steps will reproduce the problem?
1. I have integrated redis in my application to store messages basically to
to store high through put messages in the redis server . I started the
redis server and apply payload to insert some messages . After some time ,
I came to know there are huge number of " 23813 ? 0:00
<defunct> " pids created in the server, results in hung state . Please find
the logs below,
Thanks in advance
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
redis-0.900 on Solaris- 10
Please provide any additional information below.
Please find my logs below
23 Jul 15:13:36 - 1 changes in 3600 seconds. Saving...
23 Jul 15:13:36 - Background saving started by pid 25227
23 Jul 15:13:36 - DB saved on disk
23 Jul 15:13:37 * Background saving error
23 Jul 15:13:38 - 1 changes in 3600 seconds. Saving...
23 Jul 15:13:38 - Background saving started by pid 25228
23 Jul 15:13:38 - DB saved on disk
23 Jul 15:13:39 * Background saving error
23 Jul 15:13:40 . DB 0: 17179869184 keys (34359935612 volatile) in
8590019928 slots HT.
23 Jul 15:13:40 . 0 clients connected (0 slaves), 6163 bytes in use
23 Jul 15:13:40 - 1 changes in 3600 seconds. Saving...
23 Jul 15:13:40 - DB saved on disk
23 Jul 15:13:40 - Background saving started by pid 25229
23 Jul 15:13:41 * Background saving error
23 Jul 15:13:42 - 1 changes in 3600 seconds. Saving...
23 Jul 15:13:42 - DB saved on disk
23 Jul 15:13:42 - Background saving started by pid 25230
23 Jul 15:13:43 * Background saving error
23 Jul 15:13:44 - 1 changes in 3600 seconds. Saving...
23 Jul 15:13:44 - Background saving started by pid 25231
23 Jul 15:13:44 - DB saved on disk
23 Jul 15:13:45 . DB 0: 17179869184 keys (34359935612 volatile) in
8590019928 slots HT.
23 Jul 15:13:45 . 0 clients connected (0 slaves), 6163 bytes in use
23 Jul 15:13:45 * Background saving error
23 Jul 15:13:46 - 1 changes in 3600 seconds. Saving...
23 Jul 15:13:46 - Background saving started by pid 25232
23 Jul 15:13:46 - DB saved on disk
23 Jul 15:13:47 * Background saving error
23 Jul 15:13:48 - 1 changes in 3600 seconds. Saving...
23 Jul 15:13:48 - Background saving started by pid 25233
23 Jul 15:13:48 - DB saved on disk
23 Jul 15:13:49 * Background saving error
23 Jul 15:13:50 . DB 0: 17179869184 keys (34359935612 volatile) in
8590019928 slots HT.
23 Jul 15:13:50 . 0 clients connected (0 slaves), 6163 bytes in use
23 Jul 15:13:50 - 1 changes in 3600 seconds. Saving...
23 Jul 15:13:50 - Background saving started by pid 25234
Original issue reported on code.google.com by [email protected]
on 23 Jul 2009 at 3:22
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)
When connecting, select the configured database from the connectionstring.
For example with this connectionstring "jdbc:redis://localhost:6379/1" select database 1
does this project compile to jar (dbeaver driver)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.