Conversation
beinan
marked this pull request as ready for review
October 23, 2026 04:03
This was referenced Oct 23, 2026
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.
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.
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