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

Method append

nodedb-array/src/sync/op_log.rs:80–84  ·  view source on GitHub ↗
(&self, op: &ArrayOp)

Source from the content-addressed store, hash-verified

78
79impl OpLog for InMemoryOpLog {
80 fn append(&self, op: &ArrayOp) -> ArrayResult<()> {
81 let key = (op.header.array.clone(), op.header.hlc.to_bytes());
82 self.lock()?.entry(key).or_insert_with(|| op.clone());
83 Ok(())
84 }
85
86 fn scan_from<'a>(&'a self, from: Hlc) -> ArrayResult<OpIter<'a>> {
87 let guard = self.lock()?;

Callers 10

gc_with_no_acks_is_noopFunction · 0.45
append_then_scanFunction · 0.45
scan_from_skips_belowFunction · 0.45
scan_range_filters_arrayFunction · 0.45
len_counts_allFunction · 0.45

Calls 4

entryMethod · 0.80
lockMethod · 0.80
cloneMethod · 0.45
to_bytesMethod · 0.45

Tested by 10

gc_with_no_acks_is_noopFunction · 0.36
append_then_scanFunction · 0.36
scan_from_skips_belowFunction · 0.36
scan_range_filters_arrayFunction · 0.36
len_counts_allFunction · 0.36