feat: config reload for read-only segments (#9528)
commit bce7d9e ↗ · qdrant/qdrant · · committed Aug 4, 2026 · +505−3 · base beab7b0de944
Agent prompt
what a new run launched now would send
Read-only segments can already live-reload some on-disk state, but they cannot yet pick up changes to the on-disk segment config and payload-index config without a full reopen. When named dense/sparse vectors or payload field indexes are added, removed, or have their config changed on disk, an already-open read-only segment should absorb those changes while continuing to answer queries.
Add a two-phase config reload: (1) under a shared borrow, re-read the on-disk configs, diff them against the in-memory configs, and eagerly load every new or changed component (vector storages, indexes, quantized vectors, payload field indexes); (2) under a brief exclusive borrow, install the pre-loaded components and drop removed ones with no further I/O. A vector or payload field present in both configs but with a different config must be reloaded (drop + load). Keep the payload index’s has_vector / vector-storage lookup in sync when named vectors are added or removed. Reloading when the on-disk config is unchanged must be a no-op. After a successful reload, query results should still match a reference mutable segment built from the same data.
Interface contract — the change must expose exactly this surface:
ReadOnlySegment: config_reload_diff(&self, fs) -> Result<diff>, apply_config_reload(&mut self, diff); diff exposes is_empty(). Matching two-phase API on the read-only struct payload index (diff/apply, plus register/unregister of vector storages for has_vector). Public diff types may be re-exported from the read_only modules as needed by callers/tests.
Work only inside this repository checkout. Make the code change the task
describes, keeping the diff focused — no drive-by refactors.
When you are done, leave your changes committed or in the working tree;
they are collected automatically.
Stay on this snapshot checkout (`task/ycb_qdrant_cbce7d9e74c3f`). Never checkout, pull, or rebase onto `main`. That branch is a README-only orphan.
Stay on this HEAD. Do not fetch another default branch. Push only on the Cursor-created `crazy-cursor/…` side branch from this HEAD.
Some past runs of this task were launched with a different prompt (the prompt template changed since, or those runs predate this benchmark's stored prompt). Each run persists the exact prompt it sent at launch — that per-launch record is the audit trail; this page shows only the current one.
Reference diff
The task commit's diff against its first parent — the judge's comparison target.