valkey-io/valkey
[BUG] PUBSUB SHARDNUMSUB doesn't return -CROSSSLOT for cross slot shard-channels
开放
#560 创建于 2024年5月27日
breaking-changebughelp wanted
仓库指标
- 星标
- (25,779 个星标)
- PR 合并指标
- (平均合并 17天 7小时) (30 天内合并 74 个 PR)
描述
Describe the bug
In cluster mode, calling this command with two channels mapping to different slots, like PUBSUB SHARDNUMSUB ch1 ch2, succeeds. It should return a -CROSSSLOT error, like any command with keys of two different slots.
To reproduce
Call the command with two channels mapping to the same node, but different cluster slots.
Expected behavior
-CROSSSLOT error reply.
Additional information
I believe it's enough to add a key specification in the command's JSON file under src/commands/. That would make the generic machinery for cluster crosslot detect the error early and return an error.