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

the metadata lock

    • Type: Icon: Task Task
    • Resolution: Done
    • WT1.6.2
    • Affects Version/s: None
    • Component/s: None

      I'm a little unclear on the purpose of the metadata lock, here's where it's used:

      + *wt_compact wraps calls to *wt_bt_cache_op() in the metadata lock, the comments indicate it's to avoid page reconciliation collisions with checkpoints (and I'm guessing, handle close, since that code calls the checkpoint worker code),
      + __wt_conn_btree_sybnc_and_close acquires it for bulk-load handles, the comments indicate it's to avoid racing with checkpoints,
      + *wt_lsm_meta_write wraps a call to *wt_metadata_update() inside metadata lock (which looks wrong to me – I thought updating the schema file required the schema lock!?)
      + __wt_txn_checkpoint acquires it, of course

      I'm wondering if we should rename the metadata lock to be the "checkpoint lock", and the use in __wt_lsm_meta_write() is wrong?

      michaelcahill

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: