-
Notifications
You must be signed in to change notification settings - Fork 975
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
Fix cannot publish when subscribed with RESP3 #2778
Conversation
Thanks a lot, Pub/Sub tests require an update. I'm going to take care of this during the merge. |
private static boolean isAllowed(RedisCommand<?, ?, ?> command) { | ||
return ALLOWED_COMMANDS_SUBSCRIBED.contains(command.getType().name()); | ||
private boolean isAllowed(RedisCommand<?, ?, ?> command) { | ||
return getProtocolVersion() == ProtocolVersion.RESP3 || ALLOWED_COMMANDS_SUBSCRIBED.contains(command.getType().name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would also make sense to check against the negotiated version instead of the configured one as the default is to auto-detect the protocol version while ClientOptions.getProtocolVersion()
returns ProtocolVersion.newestSupported()
(RESP3). This can lead to auto-negotiation into RESP2 while ClientOptions.getProtocolVersion()
would return RESP3
.
Thank you for your contribution. That's merged, polished, and backported now. |
closes #2594
Make sure that: