Commit e0582b35 authored by antirez's avatar antirez
Browse files

Fix maxmemory shared integer check bug introduced with LFU.

parent 2d5eb1f1
......@@ -403,7 +403,7 @@ robj *tryObjectEncoding(robj *o) {
* because every object needs to have a private LRU field for the LRU
* algorithm to work well. */
if ((server.maxmemory == 0 ||
!(server.maxmemory & MAXMEMORY_FLAG_NO_SHARED_INTEGERS)) &&
!(server.maxmemory_policy & MAXMEMORY_FLAG_NO_SHARED_INTEGERS)) &&
value >= 0 &&
value < OBJ_SHARED_INTEGERS)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment