Skip to content

Fix vector set index reads killing the RESP session - #2054

Merged
Tiago Nápoli (tiagonapoli) merged 1 commit into
mainfrom
tiagonapoli/fix-vectorset-index-read-session-kill
Aug 11, 2026
Merged

Fix vector set index reads killing the RESP session#2054
Tiago Nápoli (tiagonapoli) merged 1 commit into
mainfrom
tiagonapoli/fix-vectorset-index-read-session-kill

Conversation

@tiagonapoli

@tiagonapoli Tiago Nápoli (tiagonapoli) commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

CopyRespToWithInput was missing VCARD, VISMEMBER, VLINKS and VRANDMEMBER, so reading the index for those commands hit the default: arm and threw GarnetException("Unsupported operation on input") — which escapes ProcessMessages and disposes the whole RespServerSession.

That's the frequent Garnet.test.vectorset CI failure: InterruptedVectorSetDelete calls VISMEMBER, the session dies, and the next command reports SocketClosed (usually at VSIM).

Repro matrix went from 6/10 containers failing to 0/600 iterations; full vectorset suite passes 391/391.

MainSessionFunctions.CopyRespToWithInput enumerates the vector set
commands that read the index record, but lists only 8 of the 12 that
RespCommandExtensions.IsVectorSetCommand accepts. VCARD, VISMEMBER,
VLINKS and VRANDMEMBER fall through to the default arm and throw
GarnetException("Unsupported operation on input"). That exception
escapes ProcessMessages and disposes the whole RespServerSession, so
the client's next command fails with SocketClosed.

The read reaches that switch because VectorManager.ReadVectorIndex
forwards the caller's command into the read.

This is the cause of the frequent Garnet.test.vectorset CI failures:
InterruptedVectorSetDelete calls VISMEMBER, the session dies, and every
later command in the loop talks to a dead socket - VSIM being last is
where the RedisConnectionException surfaces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3e0732df-259d-4ef2-b653-ff9fd3804334

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes RESP session termination when vector-set index reads use previously unhandled commands.

Changes:

  • Handles VCARD, VISMEMBER, VLINKS, and VRANDMEMBER index reads.
  • Prevents GarnetException from closing the client session.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread libs/server/Storage/Functions/MainStore/PrivateMethods.cs
@tiagonapoli
Tiago Nápoli (tiagonapoli) merged commit b56a766 into main Aug 11, 2026
170 checks passed
@tiagonapoli
Tiago Nápoli (tiagonapoli) deleted the tiagonapoli/fix-vectorset-index-read-session-kill branch August 11, 2026 14:41
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