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

Remove the ability to change the default checkpoint name

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0, 3.3.11, 3.2.10
    • Labels:
      None

      Description

      I noticed the checkpoint=(name=FOO) configuration today and I don't think we test it anywhere.

      The wiredtiger_open call allows you to name the checkpoints created by the checkpoint server, and I'm wondering if that still works. We use WT_CHECKPOINT (the default checkpoint name), all over the WiredTiger code, for example, when we open LSM cursors, when we open a cursor on the "most recent internal checkpoint", when creating a checkpoint in salvage, and so on.

      I modified test/format:

      diff --git a/test/format/wts.c b/test/format/wts.c
      index 69195ab..d36d3e3 100644
      --- a/test/format/wts.c
      +++ b/test/format/wts.c
      @@ -141,6 +141,7 @@ wts_open(const char *home, bool set_api, WT_CONNECTION **connp)
                  "create=true,"
                  "cache_size=%" PRIu32 "MB,"
                  "checkpoint_sync=false,"
      +           "checkpoint=(wait=5,name=FOO),"
                  "error_prefix=\"%s\"",
                  g.c_cache, g.progname);
      

      and ran with this CONFIG:

      cache=500
      checkpoints=0
      data_source=table
      file_type=row
      ops=10000000
      rows=1000
      runs=1
      

      and here's the core dump:

      t: process 80575
      t, file:wt.wt, WT_SESSION.checkpoint: src/conn/conn_dhandle.c, 304: !F_ISSET(S2C(session), WT_CONN_CLOSING)
      t, file:wt.wt, WT_SESSION.checkpoint: aborting WiredTiger library
      t, file:wt.wt, WT_SESSION.checkpoint: process ID 80575: waiting for debugger...
       
      #5  0x00000000004a4739 in __wt_assert (session=0x8034586c0, error=0, 
          file_name=0x59bc24 "src/conn/conn_dhandle.c", line_number=304, 
          fmt=0x596669 "%s") at src/support/err.c:484
      #6  0x0000000000512af2 in __wt_conn_btree_open (session=0x8034586c0, cfg=0x0, 
          flags=0) at src/conn/conn_dhandle.c:304
      #7  0x00000000004a1bf5 in __wt_session_get_btree (session=0x8034586c0, 
          uri=0x80341e178 "file:wt.wt", checkpoint=0x0, cfg=0x0, flags=0)
          at src/session/session_dhandle.c:528
      #8  0x0000000000550399 in __meta_btree_apply (session=0x8034586c0, 
          cursor=0x8034c1400, file_func=0x4b3680 <__wt_checkpoint_get_handles>, 
          name_func=0, cfg=0x7fffdfbfbf30) at src/meta/meta_apply.c:44
      #9  0x00000000005501cb in __wt_meta_apply_all (session=0x8034586c0, 
          file_func=0x4b3680 <__wt_checkpoint_get_handles>, name_func=0, 
          cfg=0x7fffdfbfbf30) at src/meta/meta_apply.c:75
      #10 0x00000000004b76ee in __checkpoint_apply_all (session=0x8034586c0, 
          cfg=0x7fffdfbfbf30, op=0x4b3680 <__wt_checkpoint_get_handles>, fullp=0x0)
          at src/txn/txn_ckpt.c:161
      #11 0x00000000004b552f in __txn_checkpoint (session=0x8034586c0, 
          cfg=0x7fffdfbfbf30) at src/txn/txn_ckpt.c:396
      #12 0x00000000004b4611 in __wt_txn_checkpoint (session=0x8034586c0, 
          cfg=0x7fffdfbfbf30) at src/txn/txn_ckpt.c:686
      #13 0x000000000049e3d2 in __session_checkpoint (wt_session=0x8034586c0, 
          config=0x8034182e0 "name=FOO") at src/session/session_api.c:1466
      #14 0x0000000000421a61 in __ckpt_server (arg=0x8034586c0)
      

      I don't remember why we wanted to let applications name checkpoints created by the checkpoint server, but we should modify format to test it in random configurations if we want to keep the feature.

        Attachments

          Activity

            People

            • Assignee:
              keith.bostic Keith Bostic
              Reporter:
              keith.bostic Keith Bostic
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: