HELLO unimplemented — breaks RESP3-capable clients (e.g. redis-py >= 8.0) #41

Open
opened 2026-06-10 12:49:39 +00:00 by sameh-farouk · 0 comments
Member

Summary

HELLO, HELLO 2, and HELLO 3 all return ERR unknown command 'HELLO'. Clients that negotiate the protocol via HELLO on connect fail. redis-py >= 8.0 raises on reconnect: the first connection silently falls back to RESP2, but pool reconnects re-issue HELLO and error out.

Reproduction

redis-cli -p 6378 HELLO 2   -> ERR unknown command 'HELLO'   (redis: returns server map)

Running a redis-py 8.0 probe against hero_db required monkeypatching the HELLO handshake to a RESP2 fallback just to keep the connection alive.

Root cause

There is no HELLO arm in the command dispatch (crates/hero_db/src/server.rs, the match cmd.as_str() block); it falls through to the unknown command default at server.rs:1029.

Suggested fix

Implement HELLO [protover] returning the server map in RESP2. Per the RESP spec, reject protover 3 with NOPROTO while RESP3 is unsupported, rather than erroring on the command itself.


Filed from a Redis-compatibility audit (hero_db v0.6.0 @ main aacaad1). Every finding was cross-validated: the same probe passes on stock redis-server 7.0.15 and fails on hero_db, using the Apache Kvrocks gocase suite (Go) and a redis-py 8.0 probe (Python). Root causes verified against the source.

## Summary `HELLO`, `HELLO 2`, and `HELLO 3` all return `ERR unknown command 'HELLO'`. Clients that negotiate the protocol via `HELLO` on connect fail. `redis-py >= 8.0` raises on reconnect: the first connection silently falls back to RESP2, but pool reconnects re-issue HELLO and error out. ## Reproduction ``` redis-cli -p 6378 HELLO 2 -> ERR unknown command 'HELLO' (redis: returns server map) ``` Running a `redis-py 8.0` probe against hero_db required monkeypatching the HELLO handshake to a RESP2 fallback just to keep the connection alive. ## Root cause There is no `HELLO` arm in the command dispatch (`crates/hero_db/src/server.rs`, the `match cmd.as_str()` block); it falls through to the `unknown command` default at `server.rs:1029`. ## Suggested fix Implement `HELLO [protover]` returning the server map in RESP2. Per the RESP spec, reject `protover 3` with `NOPROTO` while RESP3 is unsupported, rather than erroring on the command itself. --- *Filed from a Redis-compatibility audit (hero_db v0.6.0 @ main `aacaad1`). Every finding was cross-validated: the same probe **passes on stock `redis-server 7.0.15`** and **fails on hero_db**, using the Apache Kvrocks `gocase` suite (Go) and a `redis-py 8.0` probe (Python). Root causes verified against the source.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_db#41
No description provided.