diff options
author | Matt Stancliff <matt@genges.com> | 2014-12-16 00:49:14 -0500 |
---|---|---|
committer | Matt Stancliff <matt@genges.com> | 2015-01-02 11:16:10 -0500 |
commit | 02bb515a094c081fcbc3e33c60a5dbff440eb447 (patch) | |
tree | d9c803b0998f16fb4c87feab072eb47353fe100d /src/rdb.c | |
parent | bbbbfb14422ee84e4b79330f299ddacf9be23d88 (diff) | |
download | redis-02bb515a094c081fcbc3e33c60a5dbff440eb447.tar.gz |
Config: Add quicklist, remove old list options
This removes:
- list-max-ziplist-entries
- list-max-ziplist-value
This adds:
- list-max-ziplist-size
- list-compress-depth
Also updates config file with new sections and updates
tests to use quicklist settings instead of old list settings.
Diffstat (limited to 'src/rdb.c')
-rw-r--r-- | src/rdb.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -835,15 +835,15 @@ robj *rdbLoadObject(int rdbtype, rio *rdb) { if ((len = rdbLoadLen(rdb,NULL)) == REDIS_RDB_LENERR) return NULL; o = createQuicklistObject(); - quicklistSetFill(o->ptr, server.list_max_ziplist_entries); - quicklistSetCompress(o->ptr, 0 /*FIXME*/); + quicklistSetOptions(o->ptr, server.list_max_ziplist_size, + server.list_compress_depth); /* Load every single element of the list */ while(len--) { if ((ele = rdbLoadEncodedStringObject(rdb)) == NULL) return NULL; dec = getDecodedObject(ele); size_t len = sdslen(dec->ptr); - o->ptr = quicklistPushTail(o->ptr, dec->ptr, len); + quicklistPushTail(o->ptr, dec->ptr, len); decrRefCount(dec); decrRefCount(ele); } @@ -985,6 +985,8 @@ robj *rdbLoadObject(int rdbtype, rio *rdb) { } else if (rdbtype == REDIS_RDB_TYPE_LIST_QUICKLIST) { if ((len = rdbLoadLen(rdb,NULL)) == REDIS_RDB_LENERR) return NULL; o = createQuicklistObject(); + quicklistSetOptions(o->ptr, server.list_max_ziplist_size, + server.list_compress_depth); while (len--) { if ((ele = rdbLoadStringObject(rdb)) == NULL) return NULL; |