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

Method iter_conflicts

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

Source from the content-addressed store, hash-verified

48 }
49
50 fn iter_conflicts(&self, view_id: u64) -> PristineResult<Vec<(u64, Vec<StoredConflict>)>> {
51 let table = self.txn.open_table(CONFLICTS)?;
52 let start = encode_view_seq(view_id, 0);
53 let end = encode_view_seq(view_id, u64::MAX);
54 let mut out = Vec::new();
55 for entry in table.range::<&[u8; 16]>(&start..=&end)? {
56 let (key, value) = entry?;
57 let (_vid, inode) = decode_view_seq(key.value());
58 let conflicts = deserialize_conflicts(value.value())?;
59 if !conflicts.is_empty() {
60 out.push((inode, conflicts));
61 }
62 }
63 Ok(out)
64 }
65
66 fn get_change_seq(&self, view: &ViewState, change_id: NodeId) -> PristineResult<Option<u64>> {
67 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