don't load value from VM for EXISTS
This commit is contained in:
parent
a0e7e5f516
commit
f4f06efccc
1
TODO
1
TODO
@ -15,7 +15,6 @@ Virtual Memory sub-TODO:
|
||||
* Check if the page selection algorithm is working well
|
||||
* Divide swappability of objects by refcount
|
||||
* Use multiple open FDs against the VM file, one for thread.
|
||||
* EXISTS should avoid loading the object if possible without making the code too specialized.
|
||||
* vm-min-age <seconds> option
|
||||
* Make sure objects loaded from the VM are specially encoded when possible.
|
||||
* Check what happens performance-wise if instead to create threads again and again the same threads are reused forever. Note: this requires a way to disable this clients in the child, but waiting for empty new jobs queue can be enough.
|
||||
|
7
redis.c
7
redis.c
@ -4343,7 +4343,12 @@ static void delCommand(redisClient *c) {
|
||||
}
|
||||
|
||||
static void existsCommand(redisClient *c) {
|
||||
addReply(c,lookupKeyRead(c->db,c->argv[1]) ? shared.cone : shared.czero);
|
||||
expireIfNeeded(c->db,c->argv[1]);
|
||||
if (dictFind(c->db->dict,c->argv[1])) {
|
||||
addReply(c, shared.cone);
|
||||
} else {
|
||||
addReply(c, shared.czero);
|
||||
}
|
||||
}
|
||||
|
||||
static void selectCommand(redisClient *c) {
|
||||
|
Loading…
Reference in New Issue
Block a user