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

Method snapshot_conflicts

atomic-core/src/pristine/txn/read.rs:556–570  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

554 }
555
556 fn snapshot_conflicts(&self) -> PristineResult<Vec<(u64, Inode, Vec<StoredConflict>)>> {
557 let table = self.txn.open_table(CONFLICTS)?;
558 let mut rows = Vec::new();
559 for entry in table.iter()? {
560 let (key, value) = entry?;
561 let (view_id, inode) = decode_view_seq(key.value());
562 rows.push((
563 view_id,
564 Inode::new(inode),
565 deserialize_conflicts(value.value())?,
566 ));
567 }
568 rows.sort_by_key(|(view_id, inode, _)| (*view_id, *inode));
569 Ok(rows)
570 }
571
572 fn get_change_seq(&self, view: &ViewState, change_id: NodeId) -> PristineResult<Option<u64>> {
573 let table = self.txn.open_table(REV_VIEW_CHANGES)?;

Calls 5

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