Commit 9fa7beb5 authored by antirez's avatar antirez
Browse files

save ziplist encoded type as a different type id. Done as separated commit...

save ziplist encoded type as a different type id. Done as separated commit since this is the part that will not merge cleanly in 2.2
parent f8956ed6
...@@ -406,6 +406,8 @@ int rdbSaveKeyValuePair(FILE *fp, robj *key, robj *val, ...@@ -406,6 +406,8 @@ int rdbSaveKeyValuePair(FILE *fp, robj *key, robj *val,
vtype = val->type; vtype = val->type;
if (vtype == REDIS_HASH && val->encoding == REDIS_ENCODING_ZIPMAP) if (vtype == REDIS_HASH && val->encoding == REDIS_ENCODING_ZIPMAP)
vtype = REDIS_HASH_ZIPMAP; vtype = REDIS_HASH_ZIPMAP;
else if (vtype == REDIS_LIST && val->encoding == REDIS_ENCODING_ZIPLIST)
vtype = REDIS_HASH_ZIPLIST;
/* Save type, key, value */ /* Save type, key, value */
if (rdbSaveType(fp,vtype) == -1) return -1; if (rdbSaveType(fp,vtype) == -1) return -1;
if (rdbSaveStringObject(fp,key) == -1) return -1; if (rdbSaveStringObject(fp,key) == -1) return -1;
......
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