Expand description
Background HNSW builder thread.
Each Data Plane core owns one builder thread. The core sends build
requests with try_send and drains finished builds with try_recv once
per tick, so a build never blocks the core’s reactor. Both channels are
bounded:
- The request queue holds
capacityrequests. When it is full the core keeps the job in its own backlog and sends it on a later tick. The segment stays searchable by brute force meanwhile. - The completion queue holds
capacityresults. When it is full the builder thread waits for the core to drain it.
The thread builds requests in FIFO order and stops when the core drops its request sender.
Constants§
- BUILD_
QUEUE_ CAPACITY - Build requests a core’s builder queue holds. Each request carries a whole segment’s vectors, so the bound caps the memory in flight.
Functions§
- spawn_
builder - Spawn the HNSW builder thread for Data Plane core
core_id, with request and completion queues ofcapacityentries each. Fails when the OS refuses the thread.
Type Aliases§
- Build
Sender - Sender half: TPC core sends build requests to the builder thread.
- Complete
Receiver - Receiver half: TPC core receives completed builds.