Registry Mirror
Skip to content

Conversation

@beinan

@beinan beinan commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A managed Lance compaction needs a recoverable catalog publication without consuming WAL records. Treat an empty-source plan as compaction, require its own prepared descriptor format, and reuse the existing fixed manifest target and publisher fencing. Completing compaction preserves every source cursor; append publication still requires all source closure proofs.

This adds catalog support only. File rewriting and automatic worker scheduling are separate work. Existing append encodings are preserved; all WAL nodes and table publishers must be upgraded before creating compaction plans.

Part of #378.

Testing

  • Rust formatting and all-feature WAL Clippy passed.
  • Added catalog coverage for descriptor mismatches, takeover, checkpoint recovery, unchanged source cursors, malformed receipts, and completion while a later append is pending.
  • All-feature WAL tests and the complete repository CI helper passed.

@beinan
beinan marked this pull request as ready for review October 23, 2026 04:03
@beinan
beinan merged commit 6d4a020 into lance-format:main Oct 23, 2026
14 checks passed
beinan added a commit that referenced this pull request Oct 23, 2026
## Summary

Managed ingestion can leave small Lance files after tail flushes. Add
opt-in worker compaction once source scans catch up: a bounded Lance 13
rewrite prefers encoded-page copying and publishes through the existing
catalog transaction. Pending append batches take priority, prepared
files survive ownership changes, and compaction preserves every WAL
source cursor.

The initial policy supports sized, append-only, unindexed fragments. Old
files remain available to captured readers. Compaction is disabled by
default; upgrade table publishers and WAL nodes before enabling it.

Part of #378. Builds on #496.

## Testing

- All-feature ingest tests: 28 passed, 7 opt-in tests ignored.
- All-feature, all-target ingest Clippy passed with warnings denied.
- Real TLS replicas and Lance files verify fewer fragments, full-column
readback, concurrent session queries over queued WAL data, and recovery
after preparation, manifest selection, and publication confirmation.
- Regression coverage checks append batching and bounded scans through
other tables before compaction.
- All-feature ingest tests and the complete repository CI helper passed
on this commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant