From 9fa7beb515902ec0dd08b90f443a3d9c0734ea04 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 28 Feb 2011 17:06:09 +0100 Subject: [PATCH] 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 --- src/rdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rdb.c b/src/rdb.c index 60a70e01..37491889 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -406,6 +406,8 @@ int rdbSaveKeyValuePair(FILE *fp, robj *key, robj *val, vtype = val->type; if (vtype == REDIS_HASH && val->encoding == REDIS_ENCODING_ZIPMAP) vtype = REDIS_HASH_ZIPMAP; + else if (vtype == REDIS_LIST && val->encoding == REDIS_ENCODING_ZIPLIST) + vtype = REDIS_HASH_ZIPLIST; /* Save type, key, value */ if (rdbSaveType(fp,vtype) == -1) return -1; if (rdbSaveStringObject(fp,key) == -1) return -1; -- GitLab