feat(master): add IndexId task to build ZoneMap index on rollout id column#150
Merged
Conversation
…olumn Adds a third scheduler TaskKind alongside Compact and MergeWal that builds a ZoneMap scalar index on an experiment base table's `id` column. Runs on the master and shares the per-name serial gate with Compact (both mutate the shared base table; CreateIndex vs Rewrite can conflict), so the gate field is generalized from inflight_compacts to inflight_dataset_writes. The UI drawer gains an "Index id" button that enqueues the task. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
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
TaskKind::IndexId(alongsideCompactandMergeWal) that builds a ZoneMap scalar index on an experiment base table'sidcolumnCompact— both mutate the shared base table andCreateIndexvsRewritecan conflict — soMasterState::inflight_compactsis generalized toinflight_dataset_writesRolloutStore::create_id_zonemap_index()builds the index (replace(true), idempotent) and reloads the dataset; safe with the base table's MemWAL index (immutable rows, id-dedup at read)POST /api/v1/tasksTest plan
cargo test -p lance-context-core—create_id_zonemap_indexbuilds + idempotent, works with MemWAL presentcargo test -p lance-context-api—TaskKind::IndexIdserde round-trips as"index_id"cargo test -p lance-context-master—index_id_task_builds_index_and_reaches_donecargo fmt --all+cargo clippycleannpm run build(UI) passes🤖 Generated with Claude Code