Commit 9fe33a0e authored by antirez's avatar antirez
Browse files

a few more fixes, still broken

parent 2affc3ed
...@@ -5479,6 +5479,7 @@ static void blockForKey(redisClient *c, robj *key, time_t timeout) { ...@@ -5479,6 +5479,7 @@ static void blockForKey(redisClient *c, robj *key, time_t timeout) {
dictEntry *de; dictEntry *de;
list *l; list *l;
printf("blockForKey %p %s\n", c, key->ptr);
c->blockingkey = key; c->blockingkey = key;
incrRefCount(key); incrRefCount(key);
c->blockingto = timeout; c->blockingto = timeout;
...@@ -5488,6 +5489,7 @@ static void blockForKey(redisClient *c, robj *key, time_t timeout) { ...@@ -5488,6 +5489,7 @@ static void blockForKey(redisClient *c, robj *key, time_t timeout) {
l = listCreate(); l = listCreate();
retval = dictAdd(c->db->blockingkeys,key,l); retval = dictAdd(c->db->blockingkeys,key,l);
incrRefCount(key);
assert(retval == DICT_OK); assert(retval == DICT_OK);
} else { } else {
l = dictGetEntryVal(de); l = dictGetEntryVal(de);
...@@ -5502,6 +5504,7 @@ static void unblockClient(redisClient *c) { ...@@ -5502,6 +5504,7 @@ static void unblockClient(redisClient *c) {
dictEntry *de; dictEntry *de;
list *l; list *l;
printf("unblockClient %p %s\n", c, c->blockingkey->ptr);
/* Remove this client from the list of clients waiting for this key. */ /* Remove this client from the list of clients waiting for this key. */
assert(c->blockingkey != NULL); assert(c->blockingkey != NULL);
de = dictFind(c->db->blockingkeys,c->blockingkey); de = dictFind(c->db->blockingkeys,c->blockingkey);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment