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

Insert split during sync should not free blocks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.9, 4.0.3, 4.1.4, WT3.2.0
    • Component/s: None
    • Labels:
    • Backport Requested:
      v4.0, v3.6

      Description

      We have done a lot of work to allow pages to do in-memory splits during a checkpoint. Without this, high-throughput append workloads generate an enormous page at the end of the tree holding all of the data inserted while a checkpoint is running.

      It is not currently safe to allocate or free blocks in a tree where checkpoint is running. That's because the checkpoint needs to calculate a map of free space that corresponds to the pages referenced by the checkpoint (otherwise either verify reports holes in the file).

      What we are seeing in the test failure below is that an in-memory split is causing an on-disk block to be freed. This happens because the split will free any deleted references it finds in the parent, which includes freeing those blocks.

      Assert failure fired for wiredtiger-test-check-long job on 'aws-build-test2'.

      http://build.wiredtiger.com:8080/job/wiredtiger-test-check-long/970/console 

      [wiredtiger-test-check-long] $ bash -xe /tmp/jenkins8185610386492802797.sh
      + cd build_posix/bench/wtperf
      + rundir=../../../bench/wtperf/runners
      + chmod a+x ../../../bench/wtperf/runners/wtperf_ckpt.sh ../../../bench/wtperf/runners/wtperf_run.sh ../../../bench/wtperf/runners/wtperf_track.sh
      + echo 'Run truncate btree job (mongodb oplog)'
      Run truncate btree job (mongodb oplog)
      + ../../../bench/wtperf/runners/wtperf_run.sh ../../../bench/wtperf/runners/mongodb-oplog.wtperf 1
      [1536619069:263643][14648:0x7ff1ad7fa700], file:test.wt, WT_CURSOR.insert: __wt_block_off_free, 629: WT_SESSION_BTREE_SYNC_SAFE(session, S2BT(session))
      [1536619069:263681][14648:0x7ff1ad7fa700], file:test.wt, WT_CURSOR.insert: __wt_abort, 30: aborting WiredTiger library
      ../../../bench/wtperf/runners/wtperf_run.sh: line 170: 14648 Aborted                 (core dumped) LD_PRELOAD=/usr/local/lib/libtcmalloc.so  

        Attachments

          Activity

            People

            • Assignee:
              michael.cahill Michael Cahill
              Reporter:
              luke.chen Luke Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: