redict/tests/unit/type
Binbin 20854cb610
Fix zuiFind crash / RM_ScanKey hang on SET object listpack encoding (#11581)
In #11290, we added listpack encoding for SET object.
But forgot to support it in zuiFind, causes ZINTER, ZINTERSTORE,
ZINTERCARD, ZIDFF, ZDIFFSTORE to crash.
And forgot to support it in RM_ScanKey, causes it hang.

This PR add support SET listpack in zuiFind, and in RM_ScanKey.
And add tests for related commands to cover this case.

Other changes:
- There is no reason for zuiFind to go into the internals of the SET.
  It can simply use setTypeIsMember and don't care about encoding.
- Remove the `#include "intset.h"` from server.h reduce the chance of
  accidental intset API use.
- Move setTypeAddAux, setTypeRemoveAux and setTypeIsMemberAux
  interfaces to the header.
- In scanGenericCommand, use setTypeInitIterator and setTypeNext
  to handle OBJ_SET scan.
- In RM_ScanKey, improve hash scan mode, use lpGetValue like zset,
  they can share code and better performance.

The zuiFind part fixes #11578

Co-authored-by: Oran Agra <oran@redislabs.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2022-12-09 17:08:01 +02:00
..
hash.tcl fix false valgrind error on new hash test (#11200) 2022-08-29 10:25:24 +03:00
incr.tcl Make assert_refcount skip the OBJECT REFCOUNT check with needs:debug tag (#11487) 2022-11-22 16:38:27 +02:00
list-2.tcl Minor improvements for list-2 test (#8156) 2020-12-08 16:26:38 +02:00
list-3.tcl Fix quicklist node not being recompressed correctly after inserting a new node before or after it (#10120) 2022-01-16 08:54:40 +02:00
list-common.tcl Add listpack encoding for list (#11303) 2022-11-16 20:29:46 +02:00
list.tcl Add listpack encoding for list (#11303) 2022-11-16 20:29:46 +02:00
set.tcl Listpack encoding for sets (#11290) 2022-11-09 19:50:07 +02:00
stream-cgroups.tcl Regenerate payloads for cgroups tests using string2printable (#11560) 2022-12-01 09:11:33 +02:00
stream.tcl Fix XSETID with max_deleted_entry_id issue (#11444) 2022-11-02 16:16:16 +02:00
string.tcl sub-command support for ACL CAT and COMMAND LIST. redisCommand always stores fullname (#10127) 2022-01-23 10:05:06 +02:00
zset.tcl Fix zuiFind crash / RM_ScanKey hang on SET object listpack encoding (#11581) 2022-12-09 17:08:01 +02:00