Repository navigation
Fix partial vec0 rows after invalid metadata INSERT - #360
Open
dajiaohuang wants to merge 1 commit into
Open
dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Fixes #333.
vec0Update_Insertwrote rowid/chunk/vector data beforevec0_write_metadata_valuechecked metadata types. An invalid metadata value could therefore return an INSERT error after partial writes. Validate all supplied metadata values before conflict replacement or row writes, and reuse the same type check in the metadata writer.The regression test reproduces the explicit-transaction sequence with synthetic vectors: a valid insert, an invalid INTEGER metadata value, a later valid insert, and commit. It asserts that only successful rows remain, the rejected vector is not searchable, and its rowid is available for a corrected retry.
Validation on task-local Windows tooling:
pytest tests/test-loadable.py tests/test-metadata.py tests/test-insert-delete.py: 83 passed, 4 skipped; 144 snapshots passed.git diff --checkand staged diff check passed.