Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da30c9e1e3 | ||
|
|
3c51d3b36b | ||
|
|
00c7f312cc | ||
|
|
b10913b93d | ||
|
|
cbf01c0e01 |
@@ -18,6 +18,12 @@ to modify your program in order to use Redis 2.4.
|
||||
CHANGELOG
|
||||
---------
|
||||
|
||||
What's new in Redis 2.3.10 (2.4 Release Candidate 7)
|
||||
====================================================
|
||||
|
||||
* [BUGFIX] Fixed issue 593 (BRPOPLPUSH related crash).
|
||||
* [BUGFIX] Fixed an issue with the networking layer that may prevent Redis from sending the whole reply back to client under extreme conditions.
|
||||
|
||||
What's new in Redis 2.3.9 (2.4 Release Candidate 6)
|
||||
===================================================
|
||||
|
||||
|
||||
@@ -616,7 +616,7 @@ void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) {
|
||||
}
|
||||
}
|
||||
if (totwritten > 0) c->lastinteraction = time(NULL);
|
||||
if (listLength(c->reply) == 0) {
|
||||
if (c->bufpos == 0 && listLength(c->reply) == 0) {
|
||||
c->sentlen = 0;
|
||||
aeDeleteFileEvent(server.el,c->fd,AE_WRITABLE);
|
||||
|
||||
|
||||
10
src/t_list.c
10
src/t_list.c
@@ -643,7 +643,7 @@ void lremCommand(redisClient *c) {
|
||||
void rpoplpushHandlePush(redisClient *origclient, redisClient *c, robj *dstkey, robj *dstobj, robj *value) {
|
||||
robj *aux;
|
||||
|
||||
if (!handleClientsWaitingListPush(c,dstkey,value)) {
|
||||
if (!handleClientsWaitingListPush(origclient,dstkey,value)) {
|
||||
/* Create the list if the key does not exist */
|
||||
if (!dstobj) {
|
||||
dstobj = createZiplistObject();
|
||||
@@ -653,10 +653,12 @@ void rpoplpushHandlePush(redisClient *origclient, redisClient *c, robj *dstkey,
|
||||
}
|
||||
listTypePush(dstobj,value,REDIS_HEAD);
|
||||
/* If we are pushing as a result of LPUSH against a key
|
||||
* watched by BLPOPLPUSH, we need to rewrite the command vector.
|
||||
* But if this is called directly by RPOPLPUSH (either directly
|
||||
* watched by BRPOPLPUSH, we need to rewrite the command vector
|
||||
* as an LPUSH.
|
||||
*
|
||||
* If this is called directly by RPOPLPUSH (either directly
|
||||
* or via a BRPOPLPUSH where the popped list exists)
|
||||
* we should replicate the BRPOPLPUSH command itself. */
|
||||
* we should replicate the RPOPLPUSH command itself. */
|
||||
if (c != origclient) {
|
||||
aux = createStringObject("LPUSH",5);
|
||||
rewriteClientCommandVector(origclient,3,aux,dstkey,value);
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define REDIS_VERSION "2.3.9"
|
||||
#define REDIS_VERSION "2.3.10"
|
||||
|
||||
@@ -728,4 +728,18 @@ start_server {
|
||||
assert_equal 3 [r llen myotherlist]
|
||||
}
|
||||
}
|
||||
|
||||
test "Regression for bug 593 - chaining BRPOPLPUSH with other blocking cmds" {
|
||||
set rd1 [redis_deferring_client]
|
||||
set rd2 [redis_deferring_client]
|
||||
|
||||
$rd1 brpoplpush a b 0
|
||||
$rd1 brpoplpush a b 0
|
||||
$rd2 brpoplpush b c 0
|
||||
after 1000
|
||||
r lpush a data
|
||||
$rd1 close
|
||||
$rd2 close
|
||||
r ping
|
||||
} {PONG}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user