When undeleting an edge (mapping DELETED to empty), the target t
of the edgemap was not reconnected to its descendants if that edgemap made t
alive.
This is wrong: if a vertex v
is undeleted but its immediate descendant w
is kept deleted, the original deletion also deleted the pseudo-edges from v
to its descendants, and v
is disconnected, possibly causing conflicts.
XNY6VDZSCNHSAS53HRVBT5AO7HBMAWPOQX3ORCYPWVWRKA4EXMFQC
RSFUX6MLPHII3DRELHN62DOJCHFCDNKSRMWJDSFGTWN5S4RJVSSQC
YN63NUZO4LVJ7XPMURDULTXBVJKW5MVCTZ24R7Z52QMHO3HPDUVQC
X7OHUPL5VYT6ECER2KNGRNFLRX7SBZOM5QWSQ4PBO2UPIE7XM6MAC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
JACZYXK43IU5HWLHQBY3BOAE7CUO6NGEXQ3HSZL3CQP3SLGKMBOAC
FABI77LLTZYJAH4YMQ4Y6LXGTHPQ52FSA4DNZ5HHYRU2PXY5WDIAC
repair_missing_down_context(txn, channel, ws, inode, target, &[target])?;
let mut missing_down = std::mem::replace(&mut ws.missing_down, Vec::new());
missing_down.clear();
for e in iter_adjacent(
txn,
channel,
target,
EdgeFlags::DELETED,
EdgeFlags::all() - EdgeFlags::PARENT,
)? {
let e = e?;
ws.missing_down.push(*txn.find_block(&channel, e.dest())?)
}
repair_missing_down_context(txn, channel, ws, inode, target, &missing_down)?;
ws.missing_down = missing_down;