diff options
author | Binbin <binloveplay1314@qq.com> | 2022-12-09 23:08:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-09 17:08:01 +0200 |
commit | 20854cb6109c23e65dca0174517f3861a55cb694 (patch) | |
tree | 4a11c1cb4f83d640e66366eadfe88ce85dbada44 /tests/integration | |
parent | 528bb11d7a25cde99e6d48c418662575c64758b2 (diff) | |
download | redis-20854cb6109c23e65dca0174517f3861a55cb694.tar.gz |
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>
Diffstat (limited to 'tests/integration')
0 files changed, 0 insertions, 0 deletions