fix(core): fix linear context repair
Dependencies
- [2]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [3]
MMQCFCIECorrectness of the new algorithm for detecting missing contexts - [4]
H5DIAL52Mixed zombie/order conflicts: fixing the bottom vertex - [5]
HP7CKJIWFixing a bug in unrecord - [6]
FSJBK6CUFixing the stitching in cyclic conflict
Change contents
- edit in pijul-core/src/apply.rs at line 578
fn shares_alive_change(&self) -> bool {self.vertex.change == self.last_alive.change} - replacement in pijul-core/src/apply.rs at line 608
for (_, r) in descendants.range((elt.vertex, Vertex::ROOT)..=(elt.vertex, Vertex::MAX)){let descendants_to_reconnect: Vec<_> = descendants.range((elt.vertex, Vertex::ROOT)..=(elt.vertex, Vertex::MAX)).map(|(_, r)| *r).collect();for r in descendants_to_reconnect { - replacement in pijul-core/src/apply.rs at line 615
if elt.last_alive != *r {if elt.last_alive != r { - replacement in pijul-core/src/apply.rs at line 621
*r,r, - edit in pijul-core/src/apply.rs at line 631
let mut saw_dead_on_path = false; - replacement in pijul-core/src/apply.rs at line 638
if v.vertex != elt.vertex {if saw_dead_on_path && v.vertex != elt.vertex { - edit in pijul-core/src/apply.rs at line 657
saw_dead_on_path = true; - edit in pijul-core/src/apply.rs at line 713
let mut saw_dead_on_path = false; - replacement in pijul-core/src/apply.rs at line 719[4.2363]→[4.2363:2810](∅→∅),[4.2810]→[6.2360:2454](∅→∅),[6.2454]→[5.8605:8647](∅→∅),[4.2971]→[5.8605:8647](∅→∅),[5.8647]→[6.2455:3475](∅→∅)
if v.is_alive() {// We need to reconnect, and we can do it now// since we won't have a chance to visit that// edge (because non-PARENT edge we are// inserting now starts from a vertex that is// on the path, which means we've already// pushed all its children onto the stack.).debug!("put_pseudo, alive 2, {:?} {:?}",v.last_alive,stack[len - 1].vertex);debug!("{:?}", stack);let edge = Edge {dest: stack[len - 1].vertex.start_pos(),flag: EdgeFlags::empty(),introduced_by: ChangeId::ROOT,};match txn.get_graph(channel, &v.last_alive, Some(&edge.into()))? {Some(e) if e.dest() == edge.dest && e.flag() == EdgeFlags::BLOCK => {}_ => {put_graph_with_rev(txn,channel,EdgeFlags::PSEUDO,v.last_alive,stack[len - 1].vertex,ChangeId::ROOT,)?;}if v.is_alive() || v.shares_alive_change() {if saw_dead_on_path {// We need to reconnect, and we can do it now// since we won't have a chance to visit that// edge (because non-PARENT edge we are// inserting now starts from a vertex that is// on the path, which means we've already// pushed all its children onto the stack.).debug!("put_pseudo, alive 2, {:?} {:?}",v.last_alive,stack[len - 1].vertex);debug!("{:?}", stack);put_graph_with_rev(txn,channel,EdgeFlags::PSEUDO,v.last_alive,stack[len - 1].vertex,ChangeId::ROOT,)?; - edit in pijul-core/src/apply.rs at line 744
saw_dead_on_path = true;