From e0582b35984f8bc215f4a31860bcee5679f75330 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 21 Jul 2016 11:14:15 +0200 Subject: [PATCH] Fix maxmemory shared integer check bug introduced with LFU. --- src/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object.c b/src/object.c index c64d810b..a7c1e4c2 100644 --- a/src/object.c +++ b/src/object.c @@ -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) {