redict/tests/cluster/tests
Oran Agra ca1c182567 Sanitize dump payload: ziplist, listpack, zipmap, intset, stream
When loading an encoded payload we will at least do a shallow validation to
check that the size that's encoded in the payload matches the size of the
allocation.
This let's us later use this encoded size to make sure the various offsets
inside encoded payload don't reach outside the allocation, if they do, we'll
assert/panic, but at least we won't segfault or smear memory.

We can also do 'deep' validation which runs on all the records of the encoded
payload and validates that they don't contain invalid offsets. This lets us
detect corruptions early and reject a RESTORE command rather than accepting
it and asserting (crashing) later when accessing that payload via some command.

configuration:
- adding ACL flag skip-sanitize-payload
- adding config sanitize-dump-payload [yes/no/clients]

For now, we don't have a good way to ensure MIGRATE in cluster resharding isn't
being slowed down by these sanitation, so i'm setting the default value to `no`,
but later on it should be set to `clients` by default.

changes:
- changing rdbReportError not to `exit` in RESTORE command
- adding a new stat to be able to later check if cluster MIGRATE isn't being
  slowed down by sanitation.
2020-12-06 14:54:34 +02:00
..
helpers Cluster test: helpers/onlydots.tcl: detect EOF and exit. 2014-10-08 10:17:01 +02:00
includes Cluster test: when valgrind is enabled, use a larger node-timeout. 2015-01-22 16:08:21 +01:00
00-base.tcl Cluster test: move basic read/write test into a procedure. 2014-05-23 11:41:50 +02:00
01-faildet.tcl Cluster test: more reliable 01-faildet unit. 2014-05-23 11:40:34 +02:00
02-failover.tcl Cluster test: 02 unit more reliable waiting for slave sync. 2014-06-10 15:01:52 +02:00
03-failover-loop.tcl Remove trailing spaces from tests 2014-09-29 06:49:08 -04:00
04-resharding.tcl Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
05-slave-selection.tcl fix invalid 'failover' identifier in cluster slave selection test (#7942) 2020-10-25 10:05:38 +02:00
06-slave-stop-cond.tcl Cluster test: unit 06 cluster creation comment fixed. 2014-07-28 12:35:05 +02:00
07-replica-migration.tcl Cluster: more reliable migration tests. 2015-12-10 12:58:28 +01:00
08-update-msg.tcl Cluster test: unit 08, update messages. 2014-09-15 16:48:26 +02:00
09-pubsub.tcl Cluster test: unit 09, Pub/Sub across the cluster. 2014-09-15 18:11:45 +02:00
10-manual-failover.tcl Cluster: unit 10 modified to leave cluster in proper state. 2015-03-22 22:58:53 +01:00
11-manual-takeover.tcl Cluster: CLUSTER FAILOVER TAKEOVER tests. 2015-03-22 22:44:23 +01:00
12-replica-migration-2.tcl TLS: Connections refactoring and TLS support. 2019-10-07 21:06:13 +03:00
13-no-failover-option.tcl Cluster: add test for the nofailover flag. 2018-03-14 16:30:32 +01:00
14-consistency-check.tcl Fix cluster consistency-check test (#7754) 2020-09-07 18:06:25 +03:00
15-cluster-slots.tcl Add a test to prove current tcl cluster client can not handle keys with hash tag. 2020-05-11 13:14:18 +08:00
16-transactions-on-replica.tcl Allow blocked XREAD on a cluster replica (#7881) 2020-10-06 21:43:30 +03:00
17-diskless-load-swapdb.tcl Backup keys to slots map and restore when fail to sync if diskless-load type is swapdb in cluster mode (#8108) 2020-12-02 13:56:11 +02:00