Files
qdrant/lib/edge/python
qdrant-cloud-bot 9977421331 perf(edge): load ReadOnlyEdgeShard segments in parallel (#9594)
* perf(edge): load ReadOnlyEdgeShard segments in parallel

Open each segment on a dedicated thread during initial open and refresh,
reducing follower startup time for shards with many segments.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(edge): resolve clippy type_complexity in parallel segment load

Co-authored-by: Cursor <cursoragent@cursor.com>

* perf(edge): run per-segment reads on a configurable thread pool

Replace the per-segment sequential read loops and the spawn-a-thread-per-segment
loader with a single fixed-size rayon thread pool owned by each shard.

- Add EdgeConfig::max_search_threads (Option<usize>, None = CPU-derived default
  matching the core search runtime via common::defaults::search_thread_count).
- Build a long-lived pool in EdgeShard and ReadOnlyEdgeShard; reuse it for
  parallel segment loading on open/refresh instead of std::thread::spawn.
- Add EdgeReadView::par_map_segments as the single seam that runs per-segment
  work on the pool; use it in search, scroll, count, facet and rescore-formula.
  Each task mints its own HardwareCounterCell from the shared accumulator.
- Expose max_search_threads through the builder and the Python binding (+ stub).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(edge): return error instead of panicking on search pool creation

ThreadPoolBuilder::build() can fail (e.g. thread spawn / resource exhaustion).
This runs during EdgeShard open/load and ReadOnlyEdgeShard follower open, so a
transient failure must not abort the process. Propagate it as an OperationError
through the existing OperationResult-returning constructors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 13:03:44 +02:00
..
2026-01-20 18:28:40 +01:00
2026-03-11 17:13:46 +00:00

Qdrant Edge

Qdrant Edge is a lightweight, in-process vector search engine designed for embedded devices, autonomous systems, and mobile agents. It enables on-device retrieval with minimal memory footprint, no background services, and optional synchronization with Qdrant Cloud.

For connecting to remote Qdrant instances, use the qdrant-client package instead.