Skip to content

fix: backport workflow fixes and btree remap fix to v2.0#5846

Merged
jackye1995 merged 2 commits intolance-format:release/v2.0from
jackye1995:fix-release-workflows-v2
Jan 29, 2026
Merged

fix: backport workflow fixes and btree remap fix to v2.0#5846
jackye1995 merged 2 commits intolance-format:release/v2.0from
jackye1995:fix-release-workflows-v2

Conversation

@jackye1995
Copy link
Copy Markdown
Contributor

Summary

Backport to release/v2.0:

Test plan

  • Verify cherry-picks apply cleanly

🤖 Generated with Claude Code

jackye1995 and others added 2 commits January 28, 2026 21:33
- Change cargo-publish.yml runner from ubuntu-2404-8x-x64 to warp-ubuntu-latest-x64-8x
- Add skip_check_repo input to cargo-publish.yml for backfilling missed releases
- Fix ref fallback in java-publish.yml checkout steps (use inputs.ref || github.ref)
- Fix ref fallback in pypi-publish.yml windows job (use inputs.ref || github.ref)

Fixes lance-format#5837

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
)

The previous remap implementation assumed it was safe to just copy the
lookup unchanged. This is only safe if there are no deletions. If there
are deletions then the page boundaries have moved and so the min/max has
moved as well. We need to recreate both the lookup and the data when we
remap.

Closes lance-format#5826
@github-actions github-actions Bot added bug Something isn't working python labels Jan 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR Review

This backport PR cherry-picks two important fixes to the release/v2.0 branch:

  1. Workflow fixes (ci: fix rust release workflow and allow manual publish #5842): Correct ref handling for manual workflow triggers and add skip_check_repo option
  2. BTree remap fix (fix: fix remap so that it handles deletions correctly #5828): Fix index corruption when remapping with deletions

Assessment

The code changes look correct. The btree remap fix addresses a real bug where the previous implementation only copied lookup files unchanged, which was incorrect when deletions occurred (page boundaries shift, invalidating min/max values). The new approach retrains the index from remapped data, which correctly rebuilds both page data and lookup metadata.

Minor observations (non-blocking)

  1. Line 1539: mapping.clone() creates a full copy of the HashMap before wrapping in Arc. Since the mapping is already borrowed (&HashMap), this is necessary, but worth noting for awareness that large mappings will be cloned.

  2. Test coverage: Both Python and Rust tests are included for the btree remap fix, which is good. The test values (0-1000 kept, 1001-9999 deleted, 10000-14999 kept and remapped) thoroughly exercise the edge cases.

Verdict

LGTM ✓ - The backport applies cleanly and the fixes are well-tested. No P0/P1 issues identified.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 91.50943% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-index/src/scalar/btree.rs 91.50% 8 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@jackye1995 jackye1995 merged commit db1bc5f into lance-format:release/v2.0 Jan 29, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants