-
Notifications
You must be signed in to change notification settings - Fork 1.1k
RediSearch - override cluster behavior #3409
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
base: main
Are you sure you want to change the base?
Conversation
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.
@tishun let me know if you agree on the API change I suggest
Change sticky cursor implementation to propagate more lightweight Cursor object, instead the whole AggregationReply.
Get connection by nodeId
cb40503
to
e9fa8f5
Compare
Add FT.ALTER, FT.DROPINDEX (and DD), FT.SYNDUMP, FT.SYNUPDATE
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.
LGTM
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.
So I think that if we
- (optional) add the commands to the ReadOnlyCommands
- (required) and we also make sure the right commands are made keyless
... we would have the basis to implement the command tips / request-response policies
Why:
- in the RedisAdvancedCluster* we will override the logic to what we want the driver to do
- we would have the right API, which is extremely important (no commands that are keyless would be marked like having keys)
- the right commands would be read-only commands
With a new change we can then do the necessary changes and extract the logic from the RedisAdvancedCluster* elsewhere (and in a single place).
src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java
Outdated
Show resolved
Hide resolved
// --- Upstream-only selection (for write Search commands or no ReadFrom) --- | ||
private RedisClusterNode randomUpstreamNode() { |
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.
Can we make this method with package
visibility and add JavaDoc explaining what it does?
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.
done
there is a new method now - one that accounts user ReadFrom preferences
check:
6d8dad4
src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterAsyncCommandsImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterAsyncCommandsImpl.java
Outdated
Show resolved
Hide resolved
However, from my perspective, those changes will have impact over how the users perceive the API (currently when commands have key, the user expects slotHash routing in cluster). Thats why i will be happy to introduce those changes, but as a part of different PR, if you and @uglide agree. |
You can check the API changes for keyless search commands in #3456 |
See #3447