mirror of
https://github.com/redis/redis.git
synced 2026-06-04 22:27:09 -04:00
fixed a bug in rdbLoadObject abount specially encoded objects
This commit is contained in:
parent
a8dca69bb3
commit
bb039e853d
1 changed files with 4 additions and 2 deletions
6
redis.c
6
redis.c
|
|
@ -4250,8 +4250,10 @@ static robj *rdbLoadObject(int type, FILE *fp) {
|
|||
/* If we are using a zipmap and there are too big values
|
||||
* the object is converted to real hash table encoding. */
|
||||
if (o->encoding != REDIS_ENCODING_HT &&
|
||||
(sdslen(key->ptr) > server.hash_max_zipmap_value ||
|
||||
sdslen(val->ptr) > server.hash_max_zipmap_value))
|
||||
((key->encoding == REDIS_ENCODING_RAW &&
|
||||
sdslen(key->ptr) > server.hash_max_zipmap_value) ||
|
||||
(val->encoding == REDIS_ENCODING_RAW &&
|
||||
sdslen(val->ptr) > server.hash_max_zipmap_value)))
|
||||
{
|
||||
convertToRealHash(o);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue