-
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
Add cluster scan implementation #1049
Conversation
please suggest what additional tests should I add |
1a5401d
to
5f1e44b
Compare
5f1e44b
to
975ec6e
Compare
Redis server maintainer said:
I don't know that how much the feature is needed.
The above proxy feature supports
https://redis.io/commands/scan Is it better if we implement it by stateless logic? |
I am just a contributor. It is eventually needed to review by maintainer. |
approach 1
approach 2
I'd say that the approach 2 may be ideal. |
8e58f73
to
5d775bb
Compare
5d775bb
to
964a56e
Compare
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.
👍
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 squash your commits together and I'll merge.
Fix rubocop offences Implement stateless cluster scan Isolate clients access in the node computed property
462e856
to
284b30c
Compare
@@ -137,6 +137,7 @@ def send_command(command, &block) | |||
when 'wait' then @node.call_master(command, &block).reduce(:+) | |||
when 'keys' then @node.call_slave(command, &block).flatten.sort | |||
when 'dbsize' then @node.call_slave(command, &block).reduce(:+) | |||
when 'scan' then _scan(command, &block) |
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.
@byroot what about zscan/hscan/sscan, will it work? maybe I should add more tests? I'm not very familiar with internals.
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.
More tests wouldn't hurt.
Fixes #1045