Remove duplicate dbid lookup in performEvictions. (#9063)

Minor code cleanup.
This commit is contained in:
Binbin 2021-06-13 14:31:19 +08:00 committed by GitHub
parent fb140a1bff
commit 5517f3624d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -572,10 +572,10 @@ int performEvictions(void) {
bestdbid = pool[k].dbid;
if (server.maxmemory_policy & MAXMEMORY_FLAG_ALLKEYS) {
de = dictFind(server.db[pool[k].dbid].dict,
de = dictFind(server.db[bestdbid].dict,
pool[k].key);
} else {
de = dictFind(server.db[pool[k].dbid].expires,
de = dictFind(server.db[bestdbid].expires,
pool[k].key);
}