Skip to content

GetHashSlot for XREADGROUP, XREAD, XGROUP and XINFO is incorrect #2086

@nielsderdaele

Description

@nielsderdaele

The current implementation of XREADGROUP, XREAD, XGROUP and XINFO uses the ComandValuesMessage this results in an incorrect HashSlot of -1. Using these commands in a cluster environment will result in unnecessary MOVED responses (and round trips).

To fix these command some additional Message types are required. XGROUP and XINFO could be implemented using a CommandValueKeyValuesMessage (first argument is a value, second argument the key and followed by one or more values).

The XREADGROUP and XREAD commands will require a custom Message as they have multiple keys near the end of the command after the STREAMS argument. In redis-server a custom getKeys function has been implemented as well for these commands (see xreadGetKeys in db.c)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions