Fix maxmemory shared integer check bug introduced with LFU.

This commit is contained in:
antirez 2016-07-21 11:14:15 +02:00
parent 2d5eb1f1a0
commit e0582b3598

View File

@ -403,7 +403,7 @@ robj *tryObjectEncoding(robj *o) {
* because every object needs to have a private LRU field for the LRU * because every object needs to have a private LRU field for the LRU
* algorithm to work well. */ * algorithm to work well. */
if ((server.maxmemory == 0 || if ((server.maxmemory == 0 ||
!(server.maxmemory & MAXMEMORY_FLAG_NO_SHARED_INTEGERS)) && !(server.maxmemory_policy & MAXMEMORY_FLAG_NO_SHARED_INTEGERS)) &&
value >= 0 && value >= 0 &&
value < OBJ_SHARED_INTEGERS) value < OBJ_SHARED_INTEGERS)
{ {