Drain completed HNSW builds from the background builder thread and promote the corresponding building segments to sealed segments. Called at the top of `tick()` before draining new requests. `BuildComplete.key` is the old-style `"{tid}:{coll}"` string (produced by `VectorCollection::seal` which still takes `&str`). Parse it back to the tuple key to look up the map.
(&mut self)
| 31 | /// by `VectorCollection::seal` which still takes `&str`). Parse it back to |
| 32 | /// the tuple key to look up the map. |
| 33 | pub fn poll_build_completions(&mut self) { |
| 34 | let Some(rx) = &self.build_rx else { return }; |
| 35 | while let Ok(complete) = rx.try_recv() { |
| 36 | // Parse the string key `"{tid}:{coll_key}"` back into the tuple. |
| 37 | let tuple_key = parse_build_key(&complete.key); |
| 38 | if let Some(coll) = self.vector_collections.get_mut(&tuple_key) { |
| 39 | coll.complete_build(complete.segment_id, complete.index); |
| 40 | tracing::info!( |
| 41 | core = self.core_id, |
| 42 | key = %complete.key, |
| 43 | segment_id = complete.segment_id, |
| 44 | "HNSW build completed, segment promoted to sealed" |
| 45 | ); |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | /// Write HNSW checkpoints for all vector indexes to disk. |
| 51 | /// |
no test coverage detected