Handle withattribs for version < 8.0.3#5917
Merged
Merged
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
Contributor
Code Coverage - Backend unit tests
Test suite run success3439 tests passing in 307 suites. Report generated by 🧪jest coverage report action from fcae09a |
Contributor
Code Coverage - Integration Tests
|
Contributor
Code Coverage - Frontend unit tests
Test suite run success6976 tests passing in 803 suites. Report generated by 🧪jest coverage report action from fcae09a |
02dfae0 to
fd0ec8f
Compare
8c9dcb9 to
fcae09a
Compare
valkirilov
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
VSIM ... WITHATTRIBSis broken on Redis 8.0.0–8.0.2 (fixed in 8.0.3+). Added aVsimWithAttribsfeature flag and made theWITHATTRIBStoken optional in the VSIM command/preview/parse helpers.On unsupported versions, the service omits
WITHATTRIBSand back-fills attributes via a singleVGETATTRpipeline (one entry per match). The controller, DTOs, request, and response shapes are unchanged.Testing
attributesand the preview omitsWITHATTRIBS.WITHATTRIBS.Note
Medium Risk
Adds Redis-version-dependent behavior to the VectorSet similarity search path and introduces an additional
VGETATTRpipeline fallback, which could impact correctness/performance on affected Redis versions if mishandled.Overview
VectorSet similarity search is now Redis-version aware for
WITHATTRIBS. The service checks a newRedisFeature.VsimWithAttribs(fixed in Redis ≥ 8.0.3), conditionally omitsWITHATTRIBSfrom theVSIMcommand/preview, and updates reply parsing to support both stride-3 (with attributes) and stride-2 (scores only) responses.On Redis 8.0.0–8.0.2, the API keeps the response shape stable by back-filling per-match
attributesusing a singleVGETATTRpipeline (swallowing per-element errors). Tests and factories are updated to cover both the canonical path and the fallback behavior, and Redis feature detection is refactored to use a shared version-check helper.Reviewed by Cursor Bugbot for commit fcae09a. Bugbot is set up for automated code reviews on this repo. Configure here.