summaryrefslogtreecommitdiff
path: root/redis.conf
diff options
context:
space:
mode:
authorsundb <sundbcn@gmail.com>2021-08-10 14:18:49 +0800
committerGitHub <noreply@github.com>2021-08-10 09:18:49 +0300
commit02fd76b97cbc5b8ad6f4c81c8538f02c76cbed46 (patch)
tree7b40fbf03f5003c9993451dfe5b8fd902570ac51 /redis.conf
parentcbda492909cd2fff25263913cd2e1f00bc48a541 (diff)
downloadredis-02fd76b97cbc5b8ad6f4c81c8538f02c76cbed46.tar.gz
Replace all usage of ziplist with listpack for t_hash (#8887)
Part one of implementing #8702 (taking hashes first before other types) ## Description of the feature 1. Change ziplist encoded hash objects to listpack encoding. 2. Convert existing ziplists on RDB loading time. an O(n) operation. ## Rdb format changes 1. Add RDB_TYPE_HASH_LISTPACK rdb type. 2. Bump RDB_VERSION to 10 ## Interface changes 1. New `hash-max-listpack-entries` config is an alias for `hash-max-ziplist-entries` (same with `hash-max-listpack-value`) 2. OBJECT ENCODING will return `listpack` instead of `ziplist` ## Listpack improvements: 1. Support direct insert, replace integer element (rather than convert back and forth from string) 3. Add more listpack capabilities to match the ziplist ones (like `lpFind`, `lpRandomPairs` and such) 4. Optimize element length fetching, avoid multiple calculations 5. Use inline to avoid function call overhead. ## Tests 1. Add a new test to the RDB load time conversion 2. Adding the listpack unit tests. (based on the one in ziplist.c) 3. Add a few "corrupt payload: fuzzer findings" tests, and slightly modify existing ones. Co-authored-by: Oran Agra <oran@redislabs.com>
Diffstat (limited to 'redis.conf')
-rw-r--r--redis.conf4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis.conf b/redis.conf
index 84f492b88..84f45fdb7 100644
--- a/redis.conf
+++ b/redis.conf
@@ -1704,8 +1704,8 @@ notify-keyspace-events ""
# Hashes are encoded using a memory efficient data structure when they have a
# small number of entries, and the biggest entry does not exceed a given
# threshold. These thresholds can be configured using the following directives.
-hash-max-ziplist-entries 512
-hash-max-ziplist-value 64
+hash-max-listpack-entries 512
+hash-max-listpack-value 64
# Lists are also encoded in a special way to save a lot of space.
# The number of entries allowed per internal list node can be specified