MCPcopy Create free account
hub / github.com/carsonpo/haystackdb / batch_add_to_wal

Method batch_add_to_wal

src/services/commit.rs:281–296  ·  view source on GitHub ↗
(
        &mut self,
        vectors: Vec<Vec<[f32; VECTOR_SIZE]>>,
        kvs: Vec<Vec<Vec<KVPair>>>,
    )

Source from the content-addressed store, hash-verified

279 }
280
281 pub fn batch_add_to_wal(
282 &mut self,
283 vectors: Vec<Vec<[f32; VECTOR_SIZE]>>,
284 kvs: Vec<Vec<Vec<KVPair>>>,
285 ) -> io::Result<()> {
286 if vectors.len() != kvs.len() {
287 return Err(io::Error::new(
288 io::ErrorKind::InvalidInput,
289 "Quantized vectors length mismatch",
290 ));
291 }
292
293 self.state.wal.batch_add_to_wal(vectors, kvs)?;
294
295 Ok(())
296 }
297}

Callers

nothing calls this directly

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected