Remove duplicate dbid lookup in performEvictions. (#9063)
Minor code cleanup.
This commit is contained in:
parent
fb140a1bff
commit
5517f3624d
@ -572,10 +572,10 @@ int performEvictions(void) {
|
|||||||
bestdbid = pool[k].dbid;
|
bestdbid = pool[k].dbid;
|
||||||
|
|
||||||
if (server.maxmemory_policy & MAXMEMORY_FLAG_ALLKEYS) {
|
if (server.maxmemory_policy & MAXMEMORY_FLAG_ALLKEYS) {
|
||||||
de = dictFind(server.db[pool[k].dbid].dict,
|
de = dictFind(server.db[bestdbid].dict,
|
||||||
pool[k].key);
|
pool[k].key);
|
||||||
} else {
|
} else {
|
||||||
de = dictFind(server.db[pool[k].dbid].expires,
|
de = dictFind(server.db[bestdbid].expires,
|
||||||
pool[k].key);
|
pool[k].key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user