Repository navigation
fix: treat a version with no namespace record as not found - #10826
Merged
Xuanwo merged 4 commits intoNov 14, 2026
Merged
Conversation
Xuanwo
approved these changes
Nov 14, 2026
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.
Closes #10824.
LanceNamespaceExternalManifestStore::getnow returnsError::NotFoundwhen the namespace reports the table, branch, or version as missing.ExternalManifestCommitHandlerreadsError::NotFoundfrom the store as "no record" inversion_exists,is_manifest_path_authoritativeand the object-store fallback ofresolve_version_location, so cleanup now deletes a staging manifest that no namespace record points to. Other namespace errors still propagate unchanged, andget_latest_versionkeeps its separate chain-missingNonecontract.Checking out a version the namespace has no record of now goes through the same object-store fallback as other external manifest stores, so it fails with Lance's
NotFounderror (ValueErrorin Python) instead of the namespace'sTableVersionNotFounderror.How was this patch tested
test_cleanup_removes_staging_manifest_without_version_recorduses aDirectoryNamespacewith version tracking and injects onecreate_table_versionfailure during an append, so the staging manifest stays behind. It asserts the append fails with an unknown commit status, the loaded dataset remains at version 1, exactly one staging manifest remains, andhas_successor_versionis false. Cleanup withdelete_unverifiedthen removes that manifest, andcount_rows(None)on the already-loaded dataset returns 3. The test covers namespace-record classification and cleanup;count_rowson that loaded handle may use manifest metadata and does not prove a fresh reopen, full scan, or data-file readability.test_error_classificationreplacestest_get_latest_version_error_classificationand covers bothgetandget_latest_version: a missing table, branch or version reads as absent, and internal, throttling and IO errors propagate with their original variant.The branch was merged with current
mainand revalidated:cargo test --profile ci --locked -p lance --lib io::commit::namespace_manifest::tests::test_error_classificationcargo test --profile ci --locked -p lance-namespace-impls --lib dir::tests::e2e_table_version_tracking::test_cleanup_removes_staging_manifest_without_version_recordcargo test --profile ci --locked -p lance-namespace-impls --lib 'dir::tests::e2e_table_version_tracking::'(44 passed)cargo test --profile ci --locked -p lance --lib 'io::commit::external_manifest::test::'(14 passed)cargo fmt --allcargo clippy --profile ci --locked --all --tests --benches -- -D warnings