mirror of
https://github.com/fluencelabs/redis
synced 2025-06-29 17:01:33 +00:00
Manual merge after cherry-pick
This commit is contained in:
@ -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)
|
||||
@ -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;
|
||||
|
@ -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);
|
||||
|
8
src/vm.c
8
src/vm.c
@ -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. */
|
||||
|
Reference in New Issue
Block a user