snehac-miner / redis

Automatically exported from code.google.com/p/redis
0 stars 0 forks source link

Pipelining commands does not always response with expected number of command responses and client times out on read #89

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.using pipelining
2.send large number of commands (RPUSH, but others as well)
3.client will timeout waiting for an expected response that never arrives

What is the expected output? What do you see instead?

client is expecting equal number of OK responses for the pipelined commands 
send.  Sometimes the server does not respond with equal number and the client 
response 
handler times out on the reads.

What version of the product are you using? On what operating system?
Redis 1.000
Mac OS X

Please provide any additional information below.

Using pipelining on the java client (JRedis) there is a random chance that the 
client will timeout on pending responses from redis.  
A scenario that seems to have a 50% chance of duplicating this on my machine is:

flushdb
1000 RPUSH a-key [128 bytes] in a tight loop. (SET also exhibits the same 
problem]

Note:
I'm running a java proxy between client and redis which dumps the traffic to 
console.  On both client side and proxy side, *have confirmed* that always 1000 
RPUSH 
commands have been sent from the client:  both show 1000 RPUSH traffic.

On telnet using MONITOR and subsequent LLEN of the key when timeouts occur, 
have confirmed that count of RPUSH's per redis is < 1000.  (Typically the 
number is in range 
993-998).  Which is the reason the client times out: its waiting for OKs for 
the RPUSHs that redis somehow didn't receive or has dropped.

It is worth noting that the same scenario with data of 1024 had a much lower 
failure rate (!)

Original issue reported on code.google.com by SunO...@gmail.com on 5 Nov 2009 at 4:39

GoogleCodeExporter commented 8 years ago
Alright, whatever the problem with redis 1.000, this issue doesn't occur with 
redis 1.050 (git HEAD)

Original comment by SunO...@gmail.com on 5 Nov 2009 at 8:25

GoogleCodeExporter commented 8 years ago
Hello SunOf27,

the code that implements pipelining got a rewrite at some point afte Redis 1.0, 
I was 
not aware of this bug, bug I guess that in the process of rewriting it I fixed 
the issue. 
Thanks for your testing, please if you can stress-test the pipelining 
implementation 
more, if you find bugs I'll fix them promptly.

Cheers,
Salvatore

Original comment by anti...@gmail.com on 5 Nov 2009 at 8:37

GoogleCodeExporter commented 8 years ago

Original comment by anti...@gmail.com on 10 Nov 2009 at 9:13