Skip to content

bump diskann-garnet 1.0.23 with crash fix#1573

Open
hailangx wants to merge 3 commits intomainfrom
haixu/fixcrash
Open

bump diskann-garnet 1.0.23 with crash fix#1573
hailangx wants to merge 3 commits intomainfrom
haixu/fixcrash

Conversation

@hailangx
Copy link
Member

@hailangx hailangx commented Feb 20, 2026

bumps the diskann-garnet package from version 1.0.20 to 1.0.23 and includes a crash fix along with changes to default vector set parameters.

The crash fix adds validation to prevent using an invalid index when CreateIndex fails, while the default parameter changes update the quantization type from Q8 to NoQuant and the distance metric from L2 to Cosine.

@hailangx hailangx changed the title bump to diskann-garnet with crash fix bump diskann-garnet with crash fix Feb 23, 2026
…to 'cosine'

The default distance metric was changed from L2 to Cosine in
RespServerSessionVectors.cs, but the VINFO test assertions were not
updated to match. This caused all Garnet.test CI jobs to fail.
@hailangx hailangx marked this pull request as ready for review February 24, 2026 18:53
Copilot AI review requested due to automatic review settings February 24, 2026 18:53
@hailangx hailangx changed the title bump diskann-garnet with crash fix bump diskann-garnet 1.0.23 with crash fix Feb 24, 2026
Copy link
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 pull request bumps the diskann-garnet package from version 1.0.20 to 1.0.23 and includes a crash fix along with changes to default vector set parameters. The crash fix adds validation to prevent using an invalid index when CreateIndex fails, while the default parameter changes update the quantization type from Q8 to NoQuant and the distance metric from L2 to Cosine.

Changes:

  • Bumped diskann-garnet package version from 1.0.20 to 1.0.23
  • Added validation check for CreateIndex failure (returns 0) with proper cleanup and error handling
  • Changed default vector quantization type from Q8 to NoQuant and default distance metric from L2 to Cosine
  • Updated test assertions to reflect the new default distance metric (from "l2" to "cosine")

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Directory.Packages.props Bumped diskann-garnet package from version 1.0.20 to 1.0.23
libs/server/Resp/Vector/VectorManager.Locking.cs Added validation check for CreateIndex failure with cleanup logic and BADSTATE error return
libs/server/Resp/Vector/RespServerSessionVectors.cs Changed default quantType from Q8 to NoQuant and default distanceMetric from L2 to Cosine
test/Garnet.test/RespVectorSetTests.cs Updated test assertions to expect "cosine" instead of "l2" for distance metric
Comments suppressed due to low confidence (1)

libs/server/Resp/Vector/VectorManager.Locking.cs:356

  • The condition check at line 353 is redundant. At this point in the code, we are inside the else block that starts at line 325, which means needsRecreate is guaranteed to be false. The check if (!needsRecreate) will always evaluate to true and can be removed. The CleanupDroppedIndex call should always execute in this error path.
                            if (!needsRecreate)
                            {
                                CleanupDroppedIndex(ref ActiveThreadSession.vectorContext, indexContext);
                            }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

When the DiskANN native CreateIndex returns 0 (null pointer), the server
should return an error to the client rather than crashing. This adds:

- ExceptionInjectionType.VectorSet_CreateIndex_NullReturn to simulate
  the failure in DEBUG builds
- An injection point in VectorManager.Locking.cs after CreateIndex that
  drops the real index and forces a 0 return when the condition is set
- CreateIndexNullReturnIsHandledGracefully test that verifies:
  1. VADD returns an error (not a crash) when CreateIndex fails
  2. The key is properly cleaned up (doesn't exist after failure)
  3. The server remains healthy (subsequent VADD succeeds)
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.

2 participants