[V1] Cleanup VectorSet TODOs#1816
Merged
Merged
Conversation
* VectorSet todos Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com> * upd Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com> * address comment Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com> --------- Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com> Co-authored-by: Tiago Napoli <tiagonapoli@microsoft.com>
Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com>
badrishc
approved these changes
May 20, 2026
kevin-montrose
approved these changes
May 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens validation and hard limits around VectorSet commands (VADD/VSIM) and RESP parsing to eliminate TODOs and prevent overflow/memory-exhaustion paths.
Changes:
- Added explicit caps for vector dimensions, retrieve counts, and EF values; updated error messages and tests accordingly.
- Refactored VSIM output buffer sizing into helpers and added an overflow-safe default for FILTER-EF computation.
- Added a RESP-array argument-count guard with a dedicated parsing exception and a new protocol-hardening test.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Garnet.test/RespVectorSetTests.cs | Updates expected error messages and adds new VADD/VSIM validation tests. |
| test/Garnet.test/RespTests.cs | Adds a socket-level test to ensure excessive RESP array lengths are rejected and the server remains usable. |
| test/Garnet.test/Resp/ACL/RespCommandTests.cs | Adjusts VADD ACL test data to comply with new REDUCE validation. |
| libs/server/Resp/Vector/VectorManager.cs | Introduces hard limits/constants and refactors VSIM output buffer sizing; adjusts embedding read buffering. |
| libs/server/Resp/Vector/RespServerSessionVectors.cs | Enforces new limits/validation for VADD/VSIM arguments and prevents int overflow in default FILTER-EF. |
| libs/server/Resp/Parser/RespCommand.cs | Adds max RESP array length constant and throws on excessive argument counts. |
| libs/common/Parsing/RespParsingException.cs | Adds a specific exception helper for excessive RESP array argument counts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 3 commits
May 20, 2026 10:55
kevin-montrose
approved these changes
May 20, 2026
Add release/v1 to push/pull_request/workflow_run triggers for: - ci.yml (main CI tests) - codeql.yml (security scanning) - ci-bdnbenchmark.yml (benchmark CI) - docker-linux.yml (Docker image builds) - docker-windows.yml (Docker image builds) ADO compliance pipelines already use exclude-only patterns and trigger on all branches, so no changes needed there. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Benchmarks should only run on main pushes, not release branches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eSpanByteTests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Cherry-pick from #1810