Skip to content

Immutable storage for mmap text index - #8840

Merged
agourlay merged 1 commit into
devfrom
immutable-mmap-text-index
Apr 30, 2026
Merged

agourlay merged 1 commit into
devfrom
immutable-mmap-text-index

Conversation

@agourlay

@agourlay agourlay commented Apr 29, 2026 •

Copy link
Copy Markdown
Member

Make the mmap full-text index immutable on disk, mirroring the change applied to the mmap numeric index in #8594.

  • MmapInvertedIndex no longer persists runtime deletions: BufferedUpdateBitSlice is replaced with an in-memory BitVec.

  • deleted_points.dat is now build-time only — it records the points whose document was empty at build time. point_to_tokens_count.dat and deleted_points.dat join postings.dat/vocab.dat in immutable_files().

  • On reload, callers must re-supply the authoritative deletion mask via the new deleted_points: &BitSlice argument to MmapInvertedIndex::open / MmapFullTextIndex::open / FullTextIndex::new_mmap / builder_mmap.
    The id-tracker is the source of truth at runtime.

  • The reload merges the build-time empty-payload bits with the caller-provided mask via bitor_assign, after resizing to point_to_tokens_count.len() (defaulting missing trailing entries to live).

  • flusher() is now a no-op; remove() only updates the in-memory bitvec.

  • ImmutableInvertedIndex::try_from(&MmapInvertedIndex) now applies the deletion bitmask when materializing the count vector (the in-RAM variant uses count == 0 as its deletion marker).

  • ram_usage_bytes() now reports the in-memory deletion bitvec size for the mmap variant.

@agourlay agourlay added this to the Immutable payload index milestone Apr 29, 2026
@agourlay
agourlay marked this pull request as ready for review April 30, 2026 12:52
coderabbitai[bot]

This comment was marked as resolved.

@qdrant qdrant deleted a comment from coderabbitai Bot Apr 30, 2026
@agourlay
agourlay merged commit 6870f4d into dev Apr 30, 2026
15 checks passed
@agourlay
agourlay deleted the immutable-mmap-text-index branch April 30, 2026 14:12
timvisee pushed a commit that referenced this pull request May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants