Skip to content

perf(compaction): skip building row-address maps when index remapping is not needed#7778

Open
everySympathy wants to merge 1 commit into
lance-format:mainfrom
everySympathy:agent/skip-empty-index-remap
Open

perf(compaction): skip building row-address maps when index remapping is not needed#7778
everySympathy wants to merge 1 commit into
lance-format:mainfrom
everySympathy:agent/skip-empty-index-remap

Conversation

@everySympathy

@everySympathy everySympathy commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Skip capturing row addresses in compaction workers when the dataset has no remappable data index.
    • This avoids scanning the _rowid column, building an O(number of rewritten rows) RoaringTreemap, and serializing/transferring it to the commit process.
    • Deferred index remapping still captures row addresses because the fragment-reuse index (FRI) consumes them.
  • Make IndexRemapperOptions::create_remapper async and return Result<Option<Box<dyn IndexRemapper>>>.
  • Return None when the dataset has no remappable index metadata, including datasets with only FRI or other system indices.
  • Create the remapper before materializing the potentially large old-to-new row-address HashMap during commit.
  • Reuse the index metadata snapshot loaded during remapper creation, while excluding system indices from actual remapping.
  • Add regression coverage for:
    • datasets with no indices;
    • datasets with only system/FRI metadata;
    • datasets with a normal data index;
    • commit-time skipping when no remapper exists;
    • deferred versus immediate remapping under equivalent indexed conditions.

Why

For datasets without stable row IDs, compaction could previously perform two layers of work before discovering that no index could consume the result:

  1. Workers captured every old row address into a RoaringTreemap and serialized it.
  2. The commit process expanded those addresses into an old-to-new HashMap.

Both structures scale with the number of rewritten rows and are unnecessary when no data index needs remapping. On large distributed compactions, either layer can create avoidable memory pressure or OOM.

This PR skips the work at the earliest safe point and retains the commit-side guard for completed tasks that already contain row addresses.

Compatibility note

IndexRemapperOptions is a public trait. This intentionally changes create_remapper from:

fn create_remapper(&self, dataset: &Dataset) -> Result<Box<dyn IndexRemapper>>;

to:

async fn create_remapper(
    &self,
    dataset: &Dataset,
) -> Result<Option<Box<dyn IndexRemapper>>>;

This is a source-breaking API change for external trait implementors and direct callers: implementations must become async, callers must await the result, and both must handle Option. This trade-off has been discussed with a project collaborator.

Related work and attribution

This incorporates the worker-side optimization from #7773 after coordination with its author. Yue Zhang's contribution is preserved in commit with:

Co-authored-by: Yue Zhang <69956021+zhangyue19921010@users.noreply.github.com>

Thanks @zhangyue19921010 for the original implementation and collaboration.

Validation

  • cargo fmt --all -- --check
  • cargo test -p lance dataset::index::tests::test_remapper_not_created_without_remappable_indices --lib -- --exact
  • cargo test -p lance dataset::optimize::tests::test_row_addrs_only_used_with_remappable_index --lib
  • cargo test -p lance dataset::optimize::tests::test_defer_index_remap --lib -- --exact

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Makes index remapper creation asynchronous and optional, caches index metadata, and gates compaction row-address capture and index rewriting on the presence of remappable indices.

Changes

Index remap gating

Layer / File(s) Summary
Remapper contract
rust/lance/src/dataset/optimize/remapping.rs, rust/lance/src/dataset/optimize.rs
create_remapper now asynchronously returns an optional remapper; implementations return either Some or None.
Dataset index metadata loading
rust/lance/src/dataset/index.rs
System indices are excluded from remapping, metadata is loaded asynchronously and cached, and tests cover absent and required remappers.
Compaction remap flow
rust/lance/src/dataset/optimize.rs
Compaction conditionally captures row addresses and rewrites indices based on remapper availability, with coverage for non-remappable datasets.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant commit_compaction
  participant DatasetIndexRemapperOptions
  participant DatasetIndexRemapper
  participant RewriteResult
  commit_compaction->>DatasetIndexRemapperOptions: create_remapper().await
  DatasetIndexRemapperOptions->>DatasetIndexRemapper: preload index metadata
  DatasetIndexRemapper-->>commit_compaction: Some(remapper) or None
  commit_compaction->>DatasetIndexRemapper: remap_indices() when Some
  DatasetIndexRemapper-->>RewriteResult: rewritten indices
Loading

Possibly related PRs

Suggested labels: bug, performance

Suggested reviewers: wjones127, jackye1995, westonpace

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: skipping row-address map building when index remapping is unnecessary.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Jul 14, 2026
@everySympathy
everySympathy marked this pull request as ready for review July 15, 2026 07:49

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rust/lance/src/dataset/index.rs`:
- Around line 59-64: Update DatasetIndex::is_empty to evaluate loaded indices
using the same eligibility predicate as remap_indices, excluding
FRAG_REUSE_INDEX_NAME, rather than checking whether any index exists. Return
true when the manifest has no indices or only fragment-reuse metadata, and add a
regression test covering the FRI-only case.

In `@rust/lance/src/dataset/optimize.rs`:
- Around line 2964-2982: Exclude the EmptyRemap test double from coverage by
adding #[cfg_attr(coverage, coverage(off))] to the EmptyRemap type and its
test-only IndexRemapper and IndexRemapperOptions implementations.

In `@rust/lance/src/dataset/optimize/remapping.rs`:
- Around line 53-60: Expand the documentation for the public Remapper::is_empty
hook with a concise usage example and intra-document links to remap_indices and
the compaction behavior it controls. Preserve the existing conservative default
and explain how custom remappers should report whether indices require
row-address remapping.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2a48977e-7eed-4767-b32f-b17312141264

📥 Commits

Reviewing files that changed from the base of the PR and between cf3d850 and c4a33e2.

📒 Files selected for processing (3)
  • rust/lance/src/dataset/index.rs
  • rust/lance/src/dataset/optimize.rs
  • rust/lance/src/dataset/optimize/remapping.rs

Comment thread rust/lance/src/dataset/index.rs Outdated
Comment thread rust/lance/src/dataset/optimize.rs Outdated
Comment thread rust/lance/src/dataset/optimize/remapping.rs Outdated
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.70588% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance/src/dataset/optimize.rs 75.00% 3 Missing and 2 partials ⚠️
rust/lance/src/dataset/index.rs 97.87% 0 Missing and 1 partial ⚠️
rust/lance/src/dataset/optimize/remapping.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@wjones127 wjones127 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.

This is a good fix, but I'd like you to explore a simpler solution before we accept this change.

Comment thread rust/lance/src/dataset/optimize.rs Outdated
Comment on lines +1982 to +1983
let remapper = remap_options.create_remapper(dataset)?;
if remapper.is_empty().await? {

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.

suggestion: What if instead of adding a new is_empty(), we just made create_remapper return Option<_>? I think that would be simpler and avoid needing to add another trait method.

@everySympathy everySympathy Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — I’ve updated this to remove is_empty() and make create_remapper return Result<Option<Box<dyn IndexRemapper>>>, as suggested. To correctly return None for the FRI-only case before materializing the row-address map, create_remapper now needs to load index metadata, so I also made it async.

One caveat is that IndexRemapperOptions is a public trait, so changing both the return type and the method to async is a source-breaking API change for external implementors and direct callers. Are you comfortable with that trade-off, or would you prefer a compatibility-preserving approach?

@everySympathy
everySympathy force-pushed the agent/skip-empty-index-remap branch from c4a33e2 to 3beb055 Compare July 16, 2026 07:42

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rust/lance/src/dataset/optimize.rs`:
- Around line 8231-8565: Extract the overlay-compaction helpers, imports, and
tests beginning with create_base_dataset into a dedicated submodule located
beside binary_copy. Keep all overlay-specific use declarations inside that
submodule at its top, preserve the existing test behavior and symbols, and
remove the block from the parent module.

In `@rust/lance/src/dataset/optimize/remapping.rs`:
- Around line 64-70: Preserve the existing synchronous required factory method
on IndexRemapperOptions returning Box<dyn IndexRemapper>. Add a separate async
optional method with a default implementation that calls the existing factory
and wraps its result in Some, then update only the metadata-aware implementation
to override the optional method and return None when no remappable indices
exist.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1cef1c44-f8c7-44e8-ad01-5bed51c0f29d

📥 Commits

Reviewing files that changed from the base of the PR and between c4a33e2 and 29f80c1.

📒 Files selected for processing (3)
  • rust/lance/src/dataset/index.rs
  • rust/lance/src/dataset/optimize.rs
  • rust/lance/src/dataset/optimize/remapping.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rust/lance/src/dataset/optimize.rs`:
- Around line 8231-8565: Extract the overlay-compaction helpers, imports, and
tests beginning with create_base_dataset into a dedicated submodule located
beside binary_copy. Keep all overlay-specific use declarations inside that
submodule at its top, preserve the existing test behavior and symbols, and
remove the block from the parent module.

In `@rust/lance/src/dataset/optimize/remapping.rs`:
- Around line 64-70: Preserve the existing synchronous required factory method
on IndexRemapperOptions returning Box<dyn IndexRemapper>. Add a separate async
optional method with a default implementation that calls the existing factory
and wraps its result in Some, then update only the metadata-aware implementation
to override the optional method and return None when no remappable indices
exist.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1cef1c44-f8c7-44e8-ad01-5bed51c0f29d

📥 Commits

Reviewing files that changed from the base of the PR and between c4a33e2 and 29f80c1.

📒 Files selected for processing (3)
  • rust/lance/src/dataset/index.rs
  • rust/lance/src/dataset/optimize.rs
  • rust/lance/src/dataset/optimize/remapping.rs
🛑 Comments failed to post (2)
rust/lance/src/dataset/optimize.rs (1)

8231-8565: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Extract the overlay-compaction tests into a dedicated submodule.

This adds over 300 lines of helpers, imports, and tests to an already large module. Move the block beside binary_copy so its imports remain at the submodule top and the feature is independently maintainable.

As per coding guidelines, “Place use imports at the top of the file” and “Extract substantial new logic into dedicated submodules instead of inlining it into large files.” <coding_guidelines>

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rust/lance/src/dataset/optimize.rs` around lines 8231 - 8565, Extract the
overlay-compaction helpers, imports, and tests beginning with
create_base_dataset into a dedicated submodule located beside binary_copy. Keep
all overlay-specific use declarations inside that submodule at its top, preserve
the existing test behavior and symbols, and remove the block from the parent
module.

Source: Coding guidelines

rust/lance/src/dataset/optimize/remapping.rs (1)

64-70: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Preserve the existing factory method for third-party remappers.

Changing this required trait method from synchronous Box<_> to asynchronous Option<Box<_>> breaks every external implementation. Add a new async optional method with a default that wraps the existing factory in Some, then override it only where metadata-aware gating is needed.

As per coding guidelines, “Do not break public API signatures; deprecate old APIs and add a replacement.” <coding_guidelines>

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rust/lance/src/dataset/optimize/remapping.rs` around lines 64 - 70, Preserve
the existing synchronous required factory method on IndexRemapperOptions
returning Box<dyn IndexRemapper>. Add a separate async optional method with a
default implementation that calls the existing factory and wraps its result in
Some, then update only the metadata-aware implementation to override the
optional method and return None when no remappable indices exist.

Source: Coding guidelines

@everySympathy
everySympathy force-pushed the agent/skip-empty-index-remap branch from 29f80c1 to dc6b17b Compare July 16, 2026 08:31

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rust/lance/src/dataset/index.rs`:
- Around line 211-212: Replace the temporary-directory test URI in
rust/lance/src/dataset/index.rs lines 211-212 with plain memory://, removing the
test_dir and test_uri setup. In rust/lance/src/dataset/optimize.rs lines 3012
and 3065, replace each TempStrDir-based URI with plain memory://; no counters or
unique suffixes are needed.

In `@rust/lance/src/dataset/optimize.rs`:
- Around line 2027-2034: The remapper eligibility used by commit_compaction must
match the planning snapshot captured by rewrite_files. Prevent commit-time
changes to index state from creating a remapper when planned tasks lack
row_addrs, either by rejecting the mismatch or by carrying and using the
planning snapshot through commit; preserve remapping for tasks planned with
remappable indices.

In `@rust/lance/src/dataset/optimize/remapping.rs`:
- Around line 64-70: Preserve the existing public
IndexRemapperOptions::create_remapper signature for downstream implementors and
callers, marking it deprecated if needed. Add a separate async optional remapper
method with a default implementation that delegates to the compatibility hook,
and update internal compaction code to use the new method without breaking
existing trait implementations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8fab149c-ca20-44c5-ac98-1592a886caea

📥 Commits

Reviewing files that changed from the base of the PR and between 29f80c1 and dc6b17b.

📒 Files selected for processing (3)
  • rust/lance/src/dataset/index.rs
  • rust/lance/src/dataset/optimize.rs
  • rust/lance/src/dataset/optimize/remapping.rs

Comment thread rust/lance/src/dataset/index.rs Outdated
Comment thread rust/lance/src/dataset/optimize.rs Outdated
Comment on lines +64 to +70
#[async_trait]
pub trait IndexRemapperOptions: Send + Sync {
fn create_remapper(&self, dataset: &Dataset) -> Result<Box<dyn IndexRemapper>>;
/// Creates a remapper when the dataset has indices that need row address remapping.
///
/// Returns `None` when no remappable indices exist, allowing compaction to avoid
/// materializing an unused row address map.
async fn create_remapper(&self, dataset: &Dataset) -> Result<Option<Box<dyn IndexRemapper>>>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
ast-grep outline rust/lance/src/dataset/optimize/remapping.rs --items all
rg -n -C3 'IndexRemapperOptions|create_remapper' rust

Repository: lance-format/lance

Length of output: 18111


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,120p' rust/lance/src/dataset/optimize/remapping.rs
printf '\n--- optimize.rs export ---\n'
sed -n '120,150p' rust/lance/src/dataset/optimize.rs
printf '\n--- index.rs impl ---\n'
sed -n '1,70p' rust/lance/src/dataset/index.rs
printf '\n--- search deprecated/compat hook ---\n'
rg -n -C2 'deprecated|compat|create_remapper|IndexRemapperOptions' rust/lance/src/dataset

Repository: lance-format/lance

Length of output: 50376


Preserve the existing remapper trait method for downstream implementations.
This public trait is re-exported and implemented outside this module; changing create_remapper to async and Option<Box<_>> is a source break for external implementors and callers. Keep the current method as a deprecated compatibility hook and add a new async optional method with a default wrapper, or introduce a new trait.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rust/lance/src/dataset/optimize/remapping.rs` around lines 64 - 70, Preserve
the existing public IndexRemapperOptions::create_remapper signature for
downstream implementors and callers, marking it deprecated if needed. Add a
separate async optional remapper method with a default implementation that
delegates to the compatibility hook, and update internal compaction code to use
the new method without breaking existing trait implementations.

Source: Coding guidelines

@everySympathy
everySympathy force-pushed the agent/skip-empty-index-remap branch from dc6b17b to c0abd7b Compare July 16, 2026 09:06

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
rust/lance/src/dataset/optimize.rs (1)

2027-2039: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Reject mixed row-address results before inline remapping.

Line 2027 treats one row_addrs payload as sufficient. If non-empty tasks were executed against different index snapshots, lines 2112-2151 omit some tasks from RowAddrRemap, but lines 2179-2189 remap indices for every affected fragment. This can persist incomplete index mappings. Carry remapping eligibility in the task snapshot, or reject/retry when an inline remapper is available and any rewritten task lacks row_addrs; add a mixed-result regression test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rust/lance/src/dataset/optimize.rs` around lines 2027 - 2039, The
optimization flow must reject or retry mixed row-address results before inline
remapping: do not let has_address_style derive solely from any task containing
row_addrs when other rewritten tasks lack them. Track remapping eligibility with
each task snapshot or validate completed_tasks before
remap_options.create_remapper, ensuring an available inline remapper cannot
process a mixed result; add a regression test covering this case.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@rust/lance/src/dataset/optimize.rs`:
- Around line 2027-2039: The optimization flow must reject or retry mixed
row-address results before inline remapping: do not let has_address_style derive
solely from any task containing row_addrs when other rewritten tasks lack them.
Track remapping eligibility with each task snapshot or validate completed_tasks
before remap_options.create_remapper, ensuring an available inline remapper
cannot process a mixed result; add a regression test covering this case.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 365918e6-ed62-4a9b-9f63-62691dcd6278

📥 Commits

Reviewing files that changed from the base of the PR and between dc6b17b and c0abd7b.

📒 Files selected for processing (2)
  • rust/lance/src/dataset/index.rs
  • rust/lance/src/dataset/optimize.rs

@everySympathy
everySympathy force-pushed the agent/skip-empty-index-remap branch from c0abd7b to 2f247cf Compare July 16, 2026 09:30

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rust/lance/src/dataset/index.rs`:
- Around line 49-53: Preserve the existing synchronous
IndexRemapperOptions::create_remapper API for external implementors and direct
callers, marking it deprecated rather than changing its signature. Add the async
method that returns an optional remapper through a compatible new method or
extension trait, implement it for DatasetIndexRemapperOptions, and migrate only
internal compaction callers to the new async path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4f9dedd3-6db1-43d5-bb93-01d7ea1bb7c1

📥 Commits

Reviewing files that changed from the base of the PR and between c0abd7b and 2f247cf.

📒 Files selected for processing (2)
  • rust/lance/src/dataset/index.rs
  • rust/lance/src/dataset/optimize.rs

Comment thread rust/lance/src/dataset/index.rs
@everySympathy
everySympathy force-pushed the agent/skip-empty-index-remap branch from 2f247cf to 5425cb9 Compare July 16, 2026 09:47
@everySympathy everySympathy changed the title fix(compaction): skip remapping when no indices exist perf(compaction): skip unused row-address collection and remapping Jul 16, 2026
@everySympathy everySympathy changed the title perf(compaction): skip unused row-address collection and remapping perf(compaction): skip collecting row addresses when no indices need remapping Jul 16, 2026
@everySympathy everySympathy changed the title perf(compaction): skip collecting row addresses when no indices need remapping perf(compaction): skip building row-address maps when index remapping is not needed Jul 16, 2026
… is not needed

Avoid collecting row addresses in workers and materializing commit-side remap maps when no data indices need remapping. Reuse the loaded index metadata snapshot and exclude system indices from remapping.

Co-authored-by: Yue Zhang <69956021+zhangyue19921010@users.noreply.github.com>
@everySympathy
everySympathy force-pushed the agent/skip-empty-index-remap branch from 9842844 to 4053082 Compare July 16, 2026 12:13
@everySympathy
everySympathy requested a review from wjones127 July 16, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants