mirror of
https://github.com/qdrant/qdrant.git
synced 2026-07-31 15:11:35 -05:00
Optimization moves points (merge/dedup/CoW) without recording flush dependencies, so a segment's persistent_version can advance past data that isn't on disk yet. The WAL acknowledgement (get_max_persisted_version) trusts persistent_version and can truncate the WAL past those ops; once the source segments are dropped, a reload finds neither the truncated WAL entries nor the data in a durable segment, permanently losing points. Force a durable flush of all segments at the end of finish_optimization, before the source segments' data is removed, so persisted state matches reality before the WAL can be acknowledged past it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>