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

Method snapshot_conflicts

atomic-core/src/pristine/txn/write/view.rs:88–102  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

86 }
87
88 fn snapshot_conflicts(&self) -> PristineResult<Vec<(u64, Inode, Vec<StoredConflict>)>> {
89 let table = self.txn.open_table(CONFLICTS)?;
90 let mut rows = Vec::new();
91 for entry in table.iter()? {
92 let (key, value) = entry?;
93 let (view_id, inode) = decode_view_seq(key.value());
94 rows.push((
95 view_id,
96 Inode::new(inode),
97 deserialize_conflicts(value.value())?,
98 ));
99 }
100 rows.sort_by_key(|(view_id, inode, _)| (*view_id, *inode));
101 Ok(rows)
102 }
103
104 fn get_change_seq(&self, view: &ViewState, change_id: NodeId) -> PristineResult<Option<u64>> {
105 let table = self.txn.open_table(REV_VIEW_CHANGES)?;

Callers

nothing calls this directly

Calls 5

decode_view_seqFunction · 0.85
deserialize_conflictsFunction · 0.85
valueMethod · 0.80
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected