Skip to content

Conversation

@a-TODO-rov
Copy link
Contributor

@a-TODO-rov a-TODO-rov commented Oct 5, 2025

Implementing request/response policies for search - version with API overrides
Version with ClusterWriter routing implementation - #3409
Part of #3447

Copy link
Contributor

Copilot AI left a 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 Cursor objects 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.

Copy link
Collaborator

@tishun tishun left a 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

@a-TODO-rov a-TODO-rov linked an issue Oct 13, 2025 that may be closed by this pull request
@a-TODO-rov a-TODO-rov added this to the 7.0.0.RELEASE milestone Oct 14, 2025
@a-TODO-rov a-TODO-rov merged commit f059eeb into main Oct 14, 2025
10 checks passed
@a-TODO-rov a-TODO-rov deleted the search-lb-with-overrides branch October 14, 2025 06:40
a-TODO-rov added a commit that referenced this pull request Oct 20, 2025
@ggivo ggivo added the type: feature A new feature label Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RediSearch: Client‑side routing & sticky cursors

4 participants