diff options
author | Binbin <binloveplay1314@qq.com> | 2022-05-22 17:27:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-22 12:27:54 +0300 |
commit | 18cb4a7d938d01981e9f6c565532a2056ceb269b (patch) | |
tree | 3ef3ef222afc4106b14ec235ed71ad2d36d1c82f /src/object.c | |
parent | 4a7a4e42db8ff757cdf3f4a824f66426036034ef (diff) | |
download | redis-18cb4a7d938d01981e9f6c565532a2056ceb269b.tar.gz |
Remove ziplist dead code in object.c (#10751)
Remove some dead code in object.c, ziplist is no longer used in 7.0
Some backgrounds:
zipmap - hash: replaced by ziplist in #285
ziplist - hash: replaced by listpack in #8887
ziplist - zset: replaced by listpack in #9366
ziplist - list: replaced by quicklist (listpack) in #2143 / #9740
Moved the location of ziplist.h in the server.c
Diffstat (limited to 'src/object.c')
-rw-r--r-- | src/object.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/object.c b/src/object.c index 093e2619e..84a9e3afc 100644 --- a/src/object.c +++ b/src/object.c @@ -930,7 +930,6 @@ char *strEncoding(int encoding) { case OBJ_ENCODING_INT: return "int"; case OBJ_ENCODING_HT: return "hashtable"; case OBJ_ENCODING_QUICKLIST: return "quicklist"; - case OBJ_ENCODING_ZIPLIST: return "ziplist"; case OBJ_ENCODING_LISTPACK: return "listpack"; case OBJ_ENCODING_INTSET: return "intset"; case OBJ_ENCODING_SKIPLIST: return "skiplist"; @@ -998,8 +997,6 @@ size_t objectComputeSize(robj *key, robj *o, size_t sample_size, int dbid) { samples++; } while ((node = node->next) && samples < sample_size); asize += (double)elesize/samples*ql->len; - } else if (o->encoding == OBJ_ENCODING_ZIPLIST) { - asize = sizeof(*o)+zmalloc_size(o->ptr); } else { serverPanic("Unknown list encoding"); } |