-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Search - request/response policies implementation with API overrides #3465
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
Conversation
Change sticky cursor implementation to propagate more lightweight Cursor object, instead the whole AggregationReply.
Get connection by nodeId
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.
Pull Request Overview
This PR implements request/response policies for RediSearch in cluster environments, transitioning from cursor ID-based routing to cursor object-based routing with API overrides. The implementation enables keyless RediSearch commands to route randomly across cluster nodes while respecting ReadFrom policies and maintaining cursor stickiness.
Key changes:
- Replaced cursor ID parameters with
Cursorobjects containing both cursor ID and node ID for cluster routing - Added cluster-aware routing for keyless RediSearch commands that honor ReadFrom policies
- Updated cursor lifecycle to support sticky routing in cluster mode
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
AggregationReply.java |
Replaced cursor ID field with optional Cursor class containing cursor ID and node ID |
AbstractRedisAsyncCommands.java |
Updated cursor method signatures to accept Cursor objects instead of cursor IDs |
RedisAdvancedClusterAsyncCommandsImpl.java |
Added cluster routing implementation for keyless RediSearch commands |
PooledClusterConnectionProvider.java |
Added random connection selection method for keyless command routing |
| Template and interface files | Updated API signatures across sync/async/reactive interfaces to use Cursor objects |
| Test files | Updated integration tests to use new cursor API and verify cluster routing behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java
Show resolved
Hide resolved
src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterAsyncCommandsImpl.java
Show resolved
Hide resolved
src/test/java/io/lettuce/core/search/RediSearchAggregateIntegrationTests.java
Show resolved
Hide resolved
src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java
Show resolved
Hide resolved
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.
Nits only except the connection intent
Implementing request/response policies for search - version with API overrides
Version with ClusterWriter routing implementation - #3409
Part of #3447