Skip to content

[V1] Cleanup VectorSet TODOs#1816

Merged
kevin-montrose merged 10 commits into
release/v1from
tiagonapoli/cherrypick-fixes
May 20, 2026
Merged

[V1] Cleanup VectorSet TODOs#1816
kevin-montrose merged 10 commits into
release/v1from
tiagonapoli/cherrypick-fixes

Conversation

@tiagonapoli
Copy link
Copy Markdown
Collaborator

@tiagonapoli tiagonapoli commented May 20, 2026

Cherry-pick from #1810

tiagonapoli and others added 3 commits May 20, 2026 09:31
* 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>
Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com>
@tiagonapoli tiagonapoli marked this pull request as ready for review May 20, 2026 17:21
Copilot AI review requested due to automatic review settings May 20, 2026 17:21
Copy link
Copy Markdown
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 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.

Comment thread test/Garnet.test/RespVectorSetTests.cs
Comment thread libs/server/Resp/Parser/RespCommand.cs
Comment thread libs/server/Resp/Vector/VectorManager.cs
Comment thread libs/server/Resp/Vector/VectorManager.cs
Tiago Napoli added 3 commits May 20, 2026 10:55
Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com>
nit
Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com>
nit
Signed-off-by: Tiago Napoli <tiagonapoli@microsoft.com>
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>
Tiago Napoli and others added 3 commits May 20, 2026 12:31
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>
@kevin-montrose kevin-montrose merged commit c3d84b2 into release/v1 May 20, 2026
48 of 49 checks passed
@kevin-montrose kevin-montrose deleted the tiagonapoli/cherrypick-fixes branch May 20, 2026 22:16
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.

4 participants