Skip to content

Conversation

@salkhwlani
Copy link

@salkhwlani salkhwlani commented Nov 2, 2025

Problem

The scanner crashes when encountering keys with listpack encoding:

ValueError: Invalid encoding b'listpack' given

This occurs when scanning Redis 7.0+ instances, as the tool doesn't recognize the newer listpack encoding type.

Solution

Added support for the listpack encoding type in redis_types.py:
- Added REDIS_ENCODING_ID_LISTPACK = 9 constant
- Added b'listpack': REDIS_ENCODING_ID_LISTPACK mapping to REDIS_ENCODING_STR_TO_ID_LIB
- Included it in REDIS_ENCODING_ID_ALL list

Background

listpack is a more memory-efficient encoding introduced in Redis 7.0 as a replacement for ziplist in certain data structures (hashes, sorted sets, and streams).

Testing

Tested against Redis 7.0+ instance with keys using listpack encoding. The scanner now completes successfully without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants