Skip to content

Add Vector Set commands to read-only command list - #3825

Merged
a-TODO-rov merged 1 commit into
redis:mainfrom
njm1250:fix-vector-set-readonly-routing
Jul 9, 2026
Merged

a-TODO-rov merged 1 commit into
redis:mainfrom
njm1250:fix-vector-set-readonly-routing

Conversation

@njm1250

@njm1250 njm1250 commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3824

Problem

Vector Set read-only commands are routed to the master because they are not
registered in ReadOnlyCommands.

Changes

  • Registered VSIM, VCARD, VDIM, VEMB, VGETATTR, VINFO, VLINKS,
    and VRANDMEMBER as read-only commands
  • Updated ClusterReadOnlyCommandsUnitTests accordingly

Note

Low Risk
Registry-only change to read-only command classification and a test count; no auth, writes, or behavioral logic beyond cluster read routing for the new command names.

Overview
Fixes cluster routing for Vector Set queries by marking eight additional read commands as read-only in ReadOnlyCommands (VCARD, VDIM, VEMB, VGETATTR, VINFO, VLINKS, VRANDMEMBER, VSIM; VISMEMBER was already listed). Those commands can now be treated like other read-only ops and sent to replicas when read routing is enabled, instead of always hitting the master.

The cluster read-only command unit test expected count is updated from 127 to 135 to match the expanded registry.

Reviewed by Cursor Bugbot for commit 53c5f90. Bugbot is set up for automated code reviews on this repo. Configure here.

@a-TODO-rov
a-TODO-rov merged commit ffba71e into redis:main Jul 9, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vector Set read-only commands are routed to the master with ReadFrom.REPLICA

2 participants