Skip to content

Commit

Permalink
Manual merge after cherry-pick
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Jul 12, 2011
1 parent 63aed54 commit 3a4afb0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/redis.c
Expand Up @@ -706,7 +706,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)
Expand Down Expand Up @@ -1106,7 +1106,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;
Expand Down
2 changes: 1 addition & 1 deletion src/redis.h
Expand Up @@ -853,7 +853,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);
Expand Down
8 changes: 4 additions & 4 deletions src/vm.c
Expand Up @@ -1074,11 +1074,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. */
Expand Down

0 comments on commit 3a4afb0

Please sign in to comment.