Fixing a deadlock in record when the working copy can lock the transaction (not many working copy implementations do that)

pmeunier
May 12, 2022, 7:50 PM
ZHS7GTREKJ76WVU4PHIOZNEPEURQYJL3W4BT6XH2CN5G5VRPKL4QC

Dependencies

  • [2] FXEDPLRI Resurrecting tests, and type cleanup (no need for Arc<RwLock<…>> anymore)
  • [3] I24UEJQL Various post-fire fixes
  • [4] ZDK3GNDB Tag transactions (including a massive refactoring of errors)
  • [*] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • replacement in libpijul/src/record.rs at line 410
    [3.47581][2.97127:97231](),[2.97231][3.47703:47765](),[3.47703][3.47703:47765]()
    let mut txn = txn.write();
    let mut channel = channel.r.write();
    let mut graph = txn.graph(&mut *channel);
    [3.47581]
    [3.47765]
    let txn = txn.read();
    let channel = channel.r.read();
    let graph = txn.graph(&*channel);
  • replacement in libpijul/src/record.rs at line 414
    [3.47816][3.47816:47887]()
    &mut *txn,
    &mut graph,
    [3.47816]
    [2.97232]
    &*txn,
    &graph,