Correct ordering of pages in libpijul::tag::copy

pmeunier
Jul 5, 2021, 11:24 AM
SCXMBF3YX34HIMX3IZNRMBLCXY2FSBRNCP6MXJH4UEBXUML45I5AC

Dependencies

  • [2] QL6K2ZM3 Tags
  • [3] A3RM526Y Integrating identity malleability
  • [4] 5OGOE4VW Store the current channel in the pristine
  • [5] VJL7SCH2 Fixing tags with the new sanakirja_core

Change contents

  • replacement in libpijul/src/tag.rs at line 295
    [2.14212][2.14212:14371]()
    P::set_left_child(
    &mut new_page_,
    &new_curs,
    P::left_child(page.as_page(), &curs),
    );
    [2.14212]
    [2.14371]
    let left = P::left_child(page.as_page(), &curs);
    if left != 0 {
    assert!(dict.insert(left));
    let new_page = txn.txn.alloc_page()?;
    let off = new_page.0.offset;
    P::set_left_child(
    &mut new_page_,
    &new_curs,
    off,
    );
    pending.push((left, new_page));
    }
  • replacement in libpijul/src/tag.rs at line 308
    [2.14381][2.14381:14514]()
    while let Some((k, v, r)) = P::next(&txn.txn, page.as_page(), &mut curs) {
    let (k, v) = f(file_txn, txn, k, v)?;
    [2.14381]
    [2.14514]
    while let Some((k_, v_, r)) = P::next(&txn.txn, page.as_page(), &mut curs) {
    let (k, v) = f(file_txn, txn, k_, v_)?;
    assert_eq!(&k, k_);
    assert_eq!(&v, v_);
  • replacement in libpijul/src/tag.rs at line 501
    [2.20280][2.20280:20298]()
    pending: u64,
    [2.20280]
    [2.20298]
    pending_: u64,
  • replacement in libpijul/src/tag.rs at line 508
    [2.20519][2.20519:20569]()
    let mut pending = vec![(pending, *new_page)];
    [2.20519]
    [2.20569]
    let mut pending = std::collections::VecDeque::new();
    pending.push_back((pending_, *new_page));
  • replacement in libpijul/src/tag.rs at line 511
    [2.20605][2.20605:20669]()
    while let Some((old_page_off, new_page_)) = pending.pop() {
    [2.20605]
    [2.20669]
    while let Some((old_page_off, new_page_)) = pending.pop_front() {
  • replacement in libpijul/src/tag.rs at line 522
    [2.21109][2.21109:21268]()
    P::set_left_child(
    &mut new_page_,
    &new_curs,
    P::left_child(page.as_page(), &curs),
    );
    [2.21109]
    [2.21268]
    let left = P::left_child(page.as_page(), &curs);
    if left != 0 {
    let new = *new_page;
    *new_page += BLOCK_SIZE as u64;
    P::set_left_child(
    &mut new_page_,
    &new_curs,
    new,
    );
    pending.push_back((left, new));
    }
  • replacement in libpijul/src/tag.rs at line 539
    [2.21518][2.21518:21558]()
    pending.push((r, new));
    [2.21518]
    [2.21558]
    pending.push_back((r, new));