Files
qdrant/lib/collection
Arnaud Gourlay 1156d7ece1 fix(optimizer): defer source segment data destruction until durable
Optimizations copy-on-write move points out of their source segments in
memory; WAL replay can only re-derive those moves from the sources'
on-disk pre-images. Destroying the replaced segments' files right at the
swap breaks that: the moved copies may still sit unflushed in appendable
segments, so a restart before they are persisted loses the points.

Instead of dropping source data in finish_optimization, retire the
segments. Their files survive until a flush proves the durable waterline
covers the optimization, at which point flush_all destroys them. While
the files remain on disk the WAL acknowledge is capped at the wrapped
segment's persisted version, so every operation the files contradict
(deletions in particular) is replayed and re-applied on restart. A crash
in the meantime loads the retirees next to their replacement and
load-time deduplication resolves the overlap.

Optimizer tests that assert source files are gone now flush first to
mature the retirees before counting/asserting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 14:04:46 +00:00
..
2026-04-27 12:56:29 +02:00

Collection

Crate, which implements all functions required for operations with a single collection of points. Points within a collection should share the same payload schema and have same vector size. So that search requests could be performed over all points of a single collection.

Structure

Collection structure

Update process

Update process