Repository navigation
Conversation
Specify writer-only bit 20 for inverted index segments whose declared IndexMetadata version is at least 3. Require complete index metadata to be preserved across manifest publications or the write to be refused. Keep reader capability checks separate and document the upgrade and historical-snapshot limitations. Runtime support follows the format vote. Refs: lance-format#9670 Assisted-by: OpenAI Codex (GPT-6)
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Important Format specification voteThis PR modifies the Lance format specification, so it requires 3 binding +1 votes from PMC members (excluding the proposer), at least one of them on the latest commit, and a minimum 72-hour voting period, weekends excluded, before it can merge. Vote by approving this PR (+1) or requesting changes (−1, a veto). See the voting process. Approvals carry over across pushes, so a rebase or a typo fix does not send everyone back to re-vote. Whoever approves the latest commit is vouching that nothing substantive has changed since the earlier approvals; if something has, ask for fresh votes. Status: ❌ Blocked — 0 of 3 required approvals
Updated automatically by the format-spec vote gate, which re-checks every 15 minutes — just voted? Re-check now (press Run workflow; leave the input blank to re-check every open format PR). A PMC member may apply the |
There was a problem hiding this comment.
The writer-only capability remains appropriate for the released-client index-loss path in #9670. Its activation and preservation rules cover unflagged snapshots and stale writers. Runtime enforcement and regression tests remain follow-up work before activation.
Keep capability allocations distinct when integrating the pending format proposals.
| | `2^17` | `FLAG_OBJECT_METADATA` | No | Yes | The snapshot contains [clustering definitions, references, or a nonzero allocation high-water mark](clustering.md), nonempty [fragment metadata](index.md#fragment-metadata), or nonempty [index segment metadata](../index/index.md#index-segment-metadata). Reserved, unsupported until writers implement the maintenance rules. Readers may ignore this metadata. | | ||
| | `2^18` | `FLAG_ROW_ADDR_INDICES` | No | Yes | A stable-row-ID table contains an index that stores physical row addresses. Older writers could treat its entries as stable row IDs and silently extend coverage without indexing rewritten fragments. | | ||
| | `2^19` | `FLAG_INLINE_DELETIONS` | Yes | Yes | Some fragment stores its deletion vector in the manifest (`DeletionFile.inline`) rather than in a file under `_deletions/`. A reader without this flag would look for a file that does not exist. | | ||
| | `2^20` | `FLAG_VERSIONED_INVERTED_INDEX` | No | Yes | The index section contains an inverted index with declared index version 3 or later. Writers must preserve unsupported index segments or refuse the operation. See [Versioned inverted indices](#versioned-inverted-indices). Reserved and unsupported until implemented. | |
There was a problem hiding this comment.
Bit 20 is also reserved in the current specification diffs of #10358 (FLAG_BTREE_KEY_LAYOUT), #10428 (FLAG_RETENTION_LEASES), and #10780 (FLAG_LOCAL_FRAGMENT_ALIASES). Reusing the bit would let a client recognize one capability while accepting manifests that require another capability's preservation or reader rules.
These proposals are still pending, and this base rejects bit 20, so this is a non-blocking integration risk. Keep separate bit allocations as the proposals land, before enabling their implementations.
There was a problem hiding this comment.
The writer-only capability remains appropriate for the released-client index-loss path in #9670. Its activation and preservation rules cover unflagged snapshots and stale writers. The generated binding comments now match the proposal; runtime enforcement and regression tests remain follow-up work before activation.
The bit 20 allocation risk remains. Keep distinct allocations across the pending format proposals before enabling their implementations.
Summary
Reserve writer-only bit 20,
FLAG_VERSIONED_INVERTED_INDEX, for snapshots containing an inverted index segment withIndexMetadata.index_version >= 3.Refs #9670. A Pylance 8.0.1 writer can load a newer dataset, filter out an unsupported FTS index, and commit an append without that index's metadata. This proposal defines the compatibility boundary that makes such a writer refuse the dataset before committing.
Format contract
IndexMetadataversion, independently ofposting_format_version. Other index types at version 3 are unaffected.Bit 20 avoids the allocations currently proposed in #10358/#10164 (18) and #10431 (19). This PR leaves those positions unassigned in its base contract and does not approve either proposal.
Validation
1 << 20. BothDataset.insertandwrite_dataset(mode="append")refused before commit on 8.0.1 and 14.0.2. Version and rows stayed unchanged; 14.0.2 could still query the FTS index after every attempt. This is a synthetic compatibility probe, not an implemented writer change.98244d2b86c6ebc67d7ef15ae8d399187dff5981.Scope
This is the format proposal for PMC review under the format voting process. It changes only the specification and matching protobuf comments. Runtime flag support, regression tests, and the migration-guide warning will follow after the contract is accepted; this PR does not close the runtime bug.
AI assistance: OpenAI Codex assisted with investigation, drafting, and validation. The commit includes an
Assisted-bytrailer.