Skip to content

fix: list unreferenced data files newer than the retained floor - #8945

Open
jennifermell wants to merge 3 commits into
lance-format:mainfrom
jennifermell:fix-8942-cleanup-orphans-newer-than-retained-floor
Open

fix: list unreferenced data files newer than the retained floor#8945
jennifermell wants to merge 3 commits into
lance-format:mainfrom
jennifermell:fix-8942-cleanup-orphans-newer-than-retained-floor

Conversation

@jennifermell

@jennifermell jennifermell commented Sep 2, 2026

Copy link
Copy Markdown

Summary

_transactions/ and _deletions/ are clamped the same way and can strand a file for the same reason. Left for a follow-up so each gets its own regression test rather than widening destructive discovery across four subtrees at once.

Fixes #8942

Test plan

  • cargo fmt --all --check — clean
  • cargo check -p lance --tests — clean
  • cargo clippy -p lance --tests -- -D warnings — clean
  • cargo test -p lance --lib dataset::cleanup — 46 passed, 0 failed, including both new cases and fix: delete data files when cleanup retains an older tag #8708's cleanup_deletes_data_files_newer_than_tagged_version
  • Mutation check: reverting the data/ cutoff to unmodified_since fails case_1_aged; removing only the delete_unverified arm fails case_2_delete_unverified. Each case is gated on the branch it covers, and no other test changes outcome.

The data/ listing was clamped to earliest_retained_manifest_time, which is
sound only for files owned by a manifest being removed. A file owned by no
manifest is removed on its age, so its mtime is unrelated to that floor and
it was never listed. Take the later of the retained floor and the unverified
threshold, and drop the cutoff entirely under delete_unverified.

Fixes lance-format#8942
@github-actions github-actions Bot added the bug Something isn't working label Sep 2, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Sep 2, 2026
@github-actions github-actions Bot added the A-docs Documentation label Sep 3, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Sep 3, 2026

@lance-gatekeeper lance-gatekeeper Bot 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.

Gate recommendation: approve.

The earlier safety-documentation finding is addressed. The data listing now advances with the seven-day verification threshold, removes that cutoff only when delete_unverified is enabled, and has focused regression coverage for both policy branches.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docs Documentation bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cleanup_old_versions never lists unreferenced data files newer than the oldest retained manifest

1 participant