]> git.saurik.com Git - redis.git/commitdiff
Merge branch 'lists' of git://github.com/pietern/redis
authorantirez <antirez@gmail.com>
Fri, 11 Jun 2010 18:27:56 +0000 (20:27 +0200)
committerantirez <antirez@gmail.com>
Fri, 11 Jun 2010 18:27:56 +0000 (20:27 +0200)
TODO
redis.c

diff --git a/TODO b/TODO
index b7d139e9e9e0276c2304540333fbfa3242092285..7b5febcbeaa9a94d8081fadbdec6a094bb2d89f2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -5,12 +5,14 @@ VERSION 2.2 TODO (Optimizations and latency)
 ============================================
 
 * Support for syslog(3).
-* Lower the CPU usage.
-* Lower the RAM usage everywhere possible.
-* Specially encoded Sets (like Hashes).
 * Implement an UDP interface for low-latency operations.
-* What about a special coding that is about storing the "rdb" serialized format instead of the actual value? This can be used when we have LRU in order to super-compress data into memory, for data not accessed frequetly. It's a VM-alike strategy but fully in memory, may reduce the space to hold some dataset in an impressive way. Trivial to implement.
-* Another idea: LRU does not need to be super precise right? Maybe it's a good idea to just put into the skiplist implementing the LRU just the pointer to the key without evne incr/decr business, nor the need to remove the pointer when the key is deleted. There is to think more about that.
+* Use the same pointer of db->dict in db->expire hash table for keys.
+  1) Set the keyptr hash table type key destructor to NULL.
+  2) Don't copy the key in setExpire(), but instead lookup the same key
+     in the dict hash table, and use it.
+  3) Make sure (and add comments about this) that when a key is deleted or
+     an expire is touched, the order is: delete the expire, delete the key.
+  4) Make sure the SETEX command works well in all the cases. Add tests.
 
 VERSION 2.x TODO
 ================
diff --git a/redis.c b/redis.c
index 2b0e5d37a6164147adf195369086f784683d352c..8ac16295598ccc69ccd9a7cfc54aeada46cb02d3 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -4247,8 +4247,8 @@ static robj *rdbLoadObject(int type, FILE *fp) {
         while(hashlen--) {
             robj *key, *val;
 
-            if ((key = rdbLoadStringObject(fp)) == NULL) return NULL;
-            if ((val = rdbLoadStringObject(fp)) == NULL) return NULL;
+            if ((key = rdbLoadEncodedStringObject(fp)) == NULL) return NULL;
+            if ((val = rdbLoadEncodedStringObject(fp)) == NULL) return NULL;
             /* If we are using a zipmap and there are too big values
              * the object is converted to real hash table encoding. */
             if (o->encoding != REDIS_ENCODING_HT &&
@@ -8024,6 +8024,7 @@ static void discardCommand(redisClient *c) {
     freeClientMultiState(c);
     initClientMultiState(c);
     c->flags &= (~REDIS_MULTI);
+    unwatchAllKeys(c);
     addReply(c,shared.ok);
 }