redict/tests/unit
sundb 02fd76b97c
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>
2021-08-10 09:18:49 +03:00
..
moduleapi Unified Lua and modules reply parsing and added RESP3 support to RM_Call (#9202) 2021-08-04 16:28:07 +03:00
type Replace all usage of ziplist with listpack for t_hash (#8887) 2021-08-10 09:18:49 +03:00
acl.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
aofrw.tcl Replace all usage of ziplist with listpack for t_hash (#8887) 2021-08-10 09:18:49 +03:00
auth.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
bitfield.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
bitops.tcl On 32 bit platform, the bit position of GETBIT/SETBIT/BITFIELD/BITCOUNT,BITPOS may overflow (see CVE-2021-32761) (#9191) 2021-07-21 16:25:19 +03:00
dump.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
expire.tcl Add NX/XX/GT/LT options to EXPIRE command group (#2795) 2021-08-02 08:57:49 +03:00
geo.tcl GEO* STORE with empty src key delete the dest key and return 0, not empty array (#9271) 2021-08-01 19:32:24 +03:00
hyperloglog.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
info.tcl [BUGFIX] Add some missed error statistics (#9328) 2021-08-06 19:27:24 -07:00
introspection-2.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
introspection.tcl Remove leftover after CONFIG SET bind change. (#9129) 2021-06-22 14:03:00 +03:00
keyspace.tcl Replace all usage of ziplist with listpack for t_hash (#8887) 2021-08-10 09:18:49 +03:00
latency-monitor.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
lazyfree.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
limits.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
maxmemory.tcl Fix the wrong reisze of querybuf (#9003) 2021-06-15 14:46:19 +03:00
memefficiency.tcl Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
multi.tcl Fail EXEC command in case a watched key is expired (#9194) 2021-07-11 13:17:23 +03:00
networking.tcl Pre-test bind-source-addr before running test. (#9214) 2021-07-11 09:54:07 +03:00
obuf-limits.tcl Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
oom-score-adj.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
other.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
pause.tcl Add missing pause tcl test to test_helper.tcl (#9158) 2021-06-30 13:32:51 +03:00
pendingquerybuf.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
printver.tcl Print version info before running the test 2011-05-20 11:44:54 +02:00
protocol.tcl Module api support for RESP3 (#8521) 2021-08-03 11:37:19 +03:00
pubsub.tcl Fix if consumer is created as a side effect without notify and dirty++ (#9263) 2021-08-02 08:31:33 +03:00
querybuf.tcl Ignore resize threshold on idle qbuf resizing (#9322) 2021-08-06 20:50:34 +03:00
quit.tcl Add tests for OK on QUIT 2010-10-15 12:54:53 +02:00
scan.tcl Replace all usage of ziplist with listpack for t_hash (#8887) 2021-08-10 09:18:49 +03:00
scripting.tcl Unified Lua and modules reply parsing and added RESP3 support to RM_Call (#9202) 2021-08-04 16:28:07 +03:00
shutdown.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
slowlog.tcl slowlog get command supports passing in -1 to get all logs. (#9018) 2021-06-14 16:46:45 +03:00
sort.tcl Add SORT_RO command (#9299) 2021-08-09 09:40:29 +03:00
tls.tcl Add support for reading encrypted keyfiles. (#8644) 2021-03-22 13:27:46 +02:00
tracking.tcl Fix race in client side tracking (#9116) 2021-06-22 07:35:59 +03:00
wait.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00