Permalink
Browse files

Fix for issue 566, fixed in a more long term way into the 2.4 branch

  • Loading branch information...
antirez committed Jun 14, 2011
1 parent 5afce9b commit 5d919263042a899082570ec7084ddab8d07d65ac
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/sort.c
  2. +1 −0 src/t_string.c
View
@@ -363,6 +363,7 @@ void sortCommand(redisClient *c) {
}
}
}
+ lookupKeyWrite(c->db,storekey); /* Force expire of old key if needed. */
dbReplace(c->db,storekey,sobj);
/* Note: we add 1 because the DB is dirty anyway since even if the
* SORT result is empty a new key is set and maybe the old content
View
@@ -25,6 +25,7 @@ void setGenericCommand(redisClient *c, int nx, robj *key, robj *val, robj *expir
}
}
+ lookupKeyWrite(c->db,key); /* Force expire of old key if needed */
retval = dbAdd(c->db,key,val);
if (retval == REDIS_ERR) {
if (!nx) {

0 comments on commit 5d91926

Please sign in to comment.