MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / iter_conflicts

Method iter_conflicts

atomic-core/src/pristine/txn/read.rs:374–388  ·  view source on GitHub ↗
(&self, view_id: u64)

Source from the content-addressed store, hash-verified

372 }
373
374 fn iter_conflicts(&self, view_id: u64) -> PristineResult<Vec<(u64, Vec<StoredConflict>)>> {
375 let table = self.txn.open_table(CONFLICTS)?;
376 let start = encode_view_seq(view_id, 0);
377 let end = encode_view_seq(view_id, u64::MAX);
378 let mut out = Vec::new();
379 for entry in table.range::<&[u8; 16]>(&start..=&end)? {
380 let (key, value) = entry?;
381 let (_vid, inode) = decode_view_seq(key.value());
382 let conflicts = deserialize_conflicts(value.value())?;
383 if !conflicts.is_empty() {
384 out.push((inode, conflicts));
385 }
386 }
387 Ok(out)
388 }
389
390 fn get_change_seq(&self, view: &ViewState, change_id: NodeId) -> PristineResult<Option<u64>> {
391 let table = self.txn.open_table(REV_VIEW_CHANGES)?;

Callers

nothing calls this directly

Calls 5

encode_view_seqFunction · 0.85
decode_view_seqFunction · 0.85
deserialize_conflictsFunction · 0.85
is_emptyMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected