diff options
author | antirez <antirez@gmail.com> | 2011-07-12 10:03:22 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2011-07-15 18:00:24 +0200 |
commit | 891f9196fcc72faa4419a493543ce2124d622363 (patch) | |
tree | fb46b72593d86291ebb2a98897c487735f120936 | |
parent | 59aecb3a6c8da4a1e1a7f2f6a0daae0aa3b1c37a (diff) | |
download | redis-891f9196fcc72faa4419a493543ce2124d622363.tar.gz |
Manual merge after cherry-pick
-rw-r--r-- | src/redis.c | 4 | ||||
-rw-r--r-- | src/redis.h | 2 | ||||
-rw-r--r-- | src/vm.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/redis.c b/src/redis.c index cc221d08c..5ccd048df 100644 --- a/src/redis.c +++ b/src/redis.c @@ -677,7 +677,7 @@ void beforeSleep(struct aeEventLoop *eventLoop) { readQueryFromClient, c); cmd = lookupCommand(c->argv[0]->ptr); redisAssert(cmd != NULL); - call(c,cmd); + call(c); resetClient(c); /* There may be more data to process in the input buffer. */ if (c->querybuf && sdslen(c->querybuf) > 0) @@ -1067,7 +1067,7 @@ int processCommand(redisClient *c) { addReply(c,shared.queued); } else { if (server.vm_enabled && server.vm_max_threads > 0 && - blockClientOnSwappedKeys(c,cmd)) return REDIS_ERR; + blockClientOnSwappedKeys(c)) return REDIS_ERR; call(c); } return REDIS_OK; diff --git a/src/redis.h b/src/redis.h index e390de225..1fea983f4 100644 --- a/src/redis.h +++ b/src/redis.h @@ -820,7 +820,7 @@ void vmReopenSwapFile(void); int vmFreePage(off_t page); void zunionInterBlockClientOnSwappedKeys(redisClient *c, struct redisCommand *cmd, int argc, robj **argv); void execBlockClientOnSwappedKeys(redisClient *c, struct redisCommand *cmd, int argc, robj **argv); -int blockClientOnSwappedKeys(redisClient *c, struct redisCommand *cmd); +int blockClientOnSwappedKeys(redisClient *c); int dontWaitForSwappedKey(redisClient *c, robj *key); void handleClientsBlockedOnSwappedKey(redisDb *db, robj *key); vmpointer *vmSwapObjectBlocking(robj *val); @@ -1064,11 +1064,11 @@ void execBlockClientOnSwappedKeys(redisClient *c, struct redisCommand *cmd, int * * Return 1 if the client is marked as blocked, 0 if the client can * continue as the keys it is going to access appear to be in memory. */ -int blockClientOnSwappedKeys(redisClient *c, struct redisCommand *cmd) { - if (cmd->vm_preload_proc != NULL) { - cmd->vm_preload_proc(c,cmd,c->argc,c->argv); +int blockClientOnSwappedKeys(redisClient *c) { + if (c->cmd->vm_preload_proc != NULL) { + c->cmd->vm_preload_proc(c,c->cmd,c->argc,c->argv); } else { - waitForMultipleSwappedKeys(c,cmd,c->argc,c->argv); + waitForMultipleSwappedKeys(c,c->cmd,c->argc,c->argv); } /* If the client was blocked for at least one key, mark it as blocked. */ |