-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] PUBSUB SHARDNUMSUB doesn't return -CROSSSLOT for cross slot shard-channels #560
Comments
We discussed this in Redis and we were planning on breaking it for Redis 8. My comment at the time was that I viewed this more as a bug because cluster routing wouldn't work for some clients. If you sent |
Sharded pubsub isn't that well adopted yet. We still have some room to smooth rough edges until the wrong behavior becomes the defacto. I'm cool with fixing the behavior for multi channel input. |
SGTM - thanks for the context |
This is very much my view too. That's why I'm OK with other things for sharded pubsub, like using replication link, but I don't think it's OK to do such changes for regular pubsub. |
Signed-off-by: Nikhil Manglore <[email protected]>
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.
The text was updated successfully, but these errors were encountered: