Skip to content

[core][flink] Support building Lumina global index on deletion-vector tables - #8930

Open
XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:feature/lumina-index-support-dv-tables
Open

[core][flink] Support building Lumina global index on deletion-vector tables#8930
XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:feature/lumina-index-support-dv-tables

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Purpose

Building a generic global index (incl. Lumina vector) on a deletion-vectors.enabled table fails fast in GenericGlobalIndexBuilder.scan(). That guard predates read-side DV handling and is now too conservative: vector search already filters DV-deleted rows at query time via the live-row pre-filter (GlobalIndexLiveRowFilter / AbstractDataEvolutionVectorRead.preFilters), reading the current snapshot's DVs. So the index can be a superset of physical rows — deleted rows are removed on read, and it never needs rebuilding when DVs change.

Changes

  • Add opt-in GlobalIndexerFactory.supportsDeletionVectors() (default false), mirroring supportsFullTextSearch().
  • Enable it only for Lumina (LuminaVectorGlobalIndexerFactory; legacy lumina-vector-ann inherits). Other types stay rejected.
  • Gate the guard: !deletionVectorsEnabled() || supportsDeletionVectors(). Build still reads physical rows without DVs, so row-ids stay dense.

Tests

Follow-up: E2E (pre-existing DV before build; new DV after build without rebuild; consistency after DV materialize/compaction).

@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the feature/lumina-index-support-dv-tables branch from 1ed7eb5 to 7b704f2 Compare July 30, 2026 13:11
… tables

Building a generic global index (incl. Lumina vector) on a
deletion-vectors.enabled table was rejected to avoid indexing deleted rows.
That guard predates read-side DV handling: vector search removes DV-deleted
rows at query time via the live-row pre-filter, so the index can be a
superset of physical rows and never needs rebuilding when DVs change.

- Add opt-in GlobalIndexerFactory.supportsDeletionVectors() (default false),
  enabled only for Lumina (legacy lumina-vector-ann inherits it); all other
  index types stay rejected. Gate the build guard on it. The build still
  reads physical rows without DVs, so row-ids stay dense.
- Pin the whole DV vector search to one snapshot: the index scan resolves it
  once, carries it in VectorScan.Plan, and the read threads it into the
  live-row filter, scalar/raw pre-filter and batch read, so index row-ids and
  the live-row bitmap always come from the same table state.
- Drop concurrently-built global indexes on materialize compaction: the
  dropper now scans at the latest snapshot, so an index committed after the
  compaction planned (over pre-materialization row-ids) is dropped too.
- Add a deterministic test: plan at S0, delete a row at S1, then read stays
  pinned to S0.
@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the feature/lumina-index-support-dv-tables branch from 7b704f2 to ef31d32 Compare July 30, 2026 13:19
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