diff options
author | Binbin <binloveplay1314@qq.com> | 2021-06-13 14:31:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-13 09:31:19 +0300 |
commit | 5517f3624d900882eee39b06c494223087326417 (patch) | |
tree | 80609c4997f8911188403f50489682a5750219eb /src/evict.c | |
parent | fb140a1bff5a4fc3082e362f4b57030625193115 (diff) | |
download | redis-5517f3624d900882eee39b06c494223087326417.tar.gz |
Remove duplicate dbid lookup in performEvictions. (#9063)
Minor code cleanup.
Diffstat (limited to 'src/evict.c')
-rw-r--r-- | src/evict.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evict.c b/src/evict.c index 9f0aac1af..5fdcd4134 100644 --- a/src/evict.c +++ b/src/evict.c @@ -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); } |