MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / drain_fresh

Method drain_fresh

nodedb-vector/src/delta/index.rs:91–93  ·  view source on GitHub ↗

Drain all staged fresh vectors for patching into the main HNSW. After this call `fresh_len()` returns 0.

(&mut self)

Source from the content-addressed store, hash-verified

89 /// Drain all staged fresh vectors for patching into the main HNSW.
90 /// After this call `fresh_len()` returns 0.
91 pub fn drain_fresh(&mut self) -> Vec<(u32, Vec<f32>)> {
92 std::mem::take(&mut self.fresh)
93 }
94
95 /// Drain the current tombstone set.
96 /// After this call no IDs are considered tombstoned in this delta.

Callers 2

patchMethod · 0.80

Calls 1

takeFunction · 0.85

Tested by 1