Skip to content

Commit c36a995

Browse files
asg017claude
andcommitted
Propagate diskann_node_write error in delete repair path
diskann_repair_reverse_edges() ignored the return code from diskann_node_write() when writing repaired neighbor lists after a node deletion. A failed write would leave the graph inconsistent with no error reported to the caller. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c4c23bd commit c36a995

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sqlite-vec-diskann.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,13 +1621,14 @@ static int diskann_repair_reverse_edges(
16211621
break;
16221622
}
16231623

1624-
diskann_node_write(p, vec_col_idx, nodeRowid,
1625-
validity, vs, neighborIds, nis, qvecs, qs);
1624+
rc = diskann_node_write(p, vec_col_idx, nodeRowid,
1625+
validity, vs, neighborIds, nis, qvecs, qs);
16261626
}
16271627

16281628
sqlite3_free(validity);
16291629
sqlite3_free(neighborIds);
16301630
sqlite3_free(qvecs);
1631+
if (rc != SQLITE_OK) return rc;
16311632
}
16321633

16331634
return SQLITE_OK;

0 commit comments

Comments
 (0)