Skip to content

Commit

Permalink
replace calculateKeySlot with known slot in evictionPoolPopulate
Browse files Browse the repository at this point in the history
  • Loading branch information
soloestoy committed Nov 17, 2023
1 parent 9b6dded commit c682412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/evict.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void evictionPoolPopulate(int dbid, int slot, dict *sampledict, redisDb *db, str
* dictionary (but the expires one) we need to lookup the key
* again in the key dictionary to obtain the value object. */
if (server.maxmemory_policy != MAXMEMORY_VOLATILE_TTL) {
if (!(server.maxmemory_policy & MAXMEMORY_FLAG_ALLKEYS)) de = dictFind(db->dict[calculateKeySlot(key)], key);
if (!(server.maxmemory_policy & MAXMEMORY_FLAG_ALLKEYS)) de = dictFind(db->dict[slot], key);
o = dictGetVal(de);
}

Expand Down

0 comments on commit c682412

Please sign in to comment.