From 333fd216159120be0b0ce66d707fceb5e47a5aca Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 10 Dec 2009 16:38:24 +0100 Subject: [PATCH] TODO change and minor SETNX optimization --- TODO | 1 - redis.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/TODO b/TODO index 2a12f2f3..6ae0bac1 100644 --- a/TODO +++ b/TODO @@ -6,7 +6,6 @@ VERSION 1.2 TODO (Zsets, Integer encoding, Append only journal) Most of the features already implemented for this release. The following is a list of the missing things in order to release the first beta tar.gz: * Document "masterauth" in redis.conf, also merge the other related patch if it seems a safe one. -* SETNX and MSETNX should use lookupKeWrite() in order to expire volatile keys when a write attempt is made. VERSION 1.4 TODO (Hash type) ============================ diff --git a/redis.c b/redis.c index 302a2129..371f7890 100644 --- a/redis.c +++ b/redis.c @@ -2979,7 +2979,7 @@ static void echoCommand(redisClient *c) { static void setGenericCommand(redisClient *c, int nx) { int retval; - deleteIfVolatile(c->db,c->argv[1]); + if (nx) deleteIfVolatile(c->db,c->argv[1]); retval = dictAdd(c->db->dict,c->argv[1],c->argv[2]); if (retval == DICT_ERR) { if (!nx) { -- 2.49.0