-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: allow cluster READONLY command #4727
Conversation
e2cf47e
to
1aa3009
Compare
tests/dragonfly/cluster_test.py
Outdated
assert await m1_node.client.execute_command("GET X") == "1" | ||
|
||
# This behavior can be changed in the future | ||
assert await m1_node.client.execute_command("GET Y") == None |
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.
yeah, just do not forget to actually call r1_node
:)
# create cluster master and replica | ||
# For now replica always should work in read-only mode | ||
# READONLY command returns always OK without any impact | ||
# In the future we may decide to implement the same behavior as REDIS |
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.
please open an issue to actually implement this behavior. it can be minor for now.
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.
* feat: allow cluster READONLY command
@@ -447,9 +447,6 @@ void ClusterFamily::Cluster(CmdArgList args, const CommandContext& cmd_cntx) { | |||
} | |||
|
|||
void ClusterFamily::ReadOnly(CmdArgList args, const CommandContext& cmd_cntx) { | |||
if (!IsClusterEmulated()) { |
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.
use IsClusterEnabledOrEmulated here and in ClusterFamily::ReadWrite
fixes: #4718