Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-5701

If an out-of-order update masks an on-disk value, don't append it

    • Storage Engines 2020-03-09

      Hit I think a new assert running test format:

      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #1  0x00007fe2d909e801 in __GI_abort () at abort.c:79
      #2  0x00000000004998c0 in __wt_abort (session=0x7fe2da51d230) at ../src/os_common/os_abort.c:30
      #3  0x00000000005f742b in __rec_append_orig_value (session=0x7fe2da51d230, page=0x7fe2c96fb010, upd=0x7fe2c8166da0,
          unpack=0x7fe2ccff8790) at ../src/reconcile/rec_visibility.c:106
      #4  0x00000000005f83be in __wt_rec_upd_select (session=0x7fe2da51d230, r=0x7fe2a8004380, ins=0x0, ripcip=0x7fe2c96fb150,
          vpack=0x7fe2ccff8790, upd_select=0x7fe2ccff8740) at ../src/reconcile/rec_visibility.c:490
      #5  0x00000000005f57d5 in __wt_rec_row_leaf (session=0x7fe2da51d230, r=0x7fe2a8004380, pageref=0x29ce510, salvage=0x0)
          at ../src/reconcile/rec_row.c:799
      #6  0x00000000004b4927 in __reconcile (session=0x7fe2da51d230, ref=0x29ce510, salvage=0x0, flags=5,
          page_lockedp=0x7fe2ccff8a0e) at ../src/reconcile/rec_write.c:176
      #7  0x00000000004b45b9 in __wt_reconcile (session=0x7fe2da51d230, ref=0x29ce510, salvage=0x0, flags=5)
          at ../src/reconcile/rec_write.c:87
      #8  0x0000000000580e4f in __wt_sync_file (session=0x7fe2da51d230, syncop=WT_SYNC_CHECKPOINT) at ../src/btree/bt_sync.c:559
      #9  0x0000000000502db8 in __checkpoint_tree (session=0x7fe2da51d230, is_checkpoint=true, cfg=0x7fe2ccff8dd0)
          at ../src/txn/txn_ckpt.c:1610
      #10 0x00000000005030e3 in __checkpoint_tree_helper (session=0x7fe2da51d230, cfg=0x7fe2ccff8dd0)
          at ../src/txn/txn_ckpt.c:1718
      #11 0x00000000004ff292 in __checkpoint_apply_to_dhandles (session=0x7fe2da51d230, cfg=0x7fe2ccff8dd0,
          op=0x503054 <__checkpoint_tree_helper>) at ../src/txn/txn_ckpt.c:199
      #12 0x0000000000500e9b in __txn_checkpoint (session=0x7fe2da51d230, cfg=0x7fe2ccff8dd0) at ../src/txn/txn_ckpt.c:864
      #13 0x0000000000501a8f in __txn_checkpoint_wrapper (session=0x7fe2da51d230, cfg=0x7fe2ccff8dd0)
          at ../src/txn/txn_ckpt.c:1076
      #14 0x0000000000501c08 in __wt_txn_checkpoint (session=0x7fe2da51d230, cfg=0x7fe2ccff8dd0, waiting=true)
          at ../src/txn/txn_ckpt.c:1133
      #15 0x00000000004da576 in __session_checkpoint (wt_session=0x7fe2da51d230, config=0x0) at ../src/session/session_api.c:1971
      #16 0x00000000004108c9 in checkpoint (arg=0x0) at ../../../test/format/util.c:547
      #17 0x00007fe2d9d126db in start_thread (arg=0x7fe2ccff9700) at pthread_create.c:463
      #18 0x00007fe2d917f88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      (gdb) f 3
      #3  0x00000000005f742b in __rec_append_orig_value (session=0x7fe2da51d230, page=0x7fe2c96fb010, upd=0x7fe2c8166da0,
          unpack=0x7fe2ccff8790) at ../src/reconcile/rec_visibility.c:106
      106             WT_ASSERT(
      (gdb) l
      101         total_size = size = 0;     /* -Wconditional-uninitialized */
      102         if (unpack == NULL || unpack->type == WT_CELL_DEL)
      103             WT_RET(__wt_update_alloc(session, NULL, &append, &size, WT_UPDATE_TOMBSTONE));
      104         else {
      105             /* Timestamp should always be in descending order. */
      106             WT_ASSERT(
      107               session, last_committed_upd == NULL || last_committed_upd->start_ts >= unpack->start_ts);
      108             WT_RET(__wt_scr_alloc(session, 0, &tmp));
      109             WT_ERR(__wt_page_cell_data_ref(session, page, unpack, tmp));
      110             WT_ERR(__wt_update_alloc(session, tmp, &append, &size, WT_UPDATE_STANDARD));
      (gdb) p last_committed_upd->start_ts
      $1 = 20832
      (gdb) p unpack->start_ts
      $2 = 35969
      

      Config is same as config in WT-5664.

      Assertion is:
      WT_ASSERT(session, last_committed_upd == NULL || last_committed_upd->start_ts >= unpack->start_ts);

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: