Nordix / hiredis-cluster

C client library for Valkey/Redis Cluster. This project is used and sponsored by Ericsson. It is a fork of the now unmaintained hiredis-vip.
BSD 3-Clause "New" or "Revised" License
86 stars 42 forks source link

Failed to find keys of command XREADGROUP #186

Closed zyhuf closed 1 year ago

zyhuf commented 1 year ago

The following command is throwing an error. Why isn't this format supported? XREADGROUP GROUP XX XX COUNT 1 STREAMS XX >

zuiderkwast commented 1 year ago

Thanks for the report.

We use a Python script to extract the syntax of each command given in Redis JSON files. Then we turn this into a C array and we have some C code to find the keys in a command based on this.

In XREADGROUP, the keys are not in a fixed position, but it's located after the 'STREAMS' keyword, which can be in any position of the command. That's probably why we don't handle this yet, but I don't remember exactly.

zuiderkwast commented 1 year ago

There is special code for XREAD and XREADGROUP but it was untested and obviously it wasn't working.

I'm fixing it and adding a test case in #187.