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

Cannot restart if 0-length WiredTiger file

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.5.2
    • Labels:

      Description

      This is from https://jira.mongodb.org/browse/SERVER-17571.

      Although it is a small window, if we end up with a 0-length WiredTiger file, but a WiredTiger.basecfg, then the system cannot restart. It errors with:

      wiredtiger_open: WiredTiger.basecfg exists before database creation: Invalid argument
      

      This situation can arise if the system crashes during startup of WT. WT created and wrote to the WiredTiger file and also created the WiredTiger.basecfg file (possibly wrote to it too), but the WiredTiger file contents did not make it to disk. Upon reboot, the system finds a 0-length WiredTiger file and sets conn->is_new to 1 but takes the error path upon finding the config file.

      I think we should fsync the file after we write it to fix this window. The wiredtiger_open path is not performance critical.

        Activity

        Hide
        keith.bostic Keith Bostic added a comment -

        Closed with the merge of 8723e7c.

        Show
        keith.bostic Keith Bostic added a comment - Closed with the merge of 8723e7c.
        Hide
        ramon.fernandez Ramon Fernandez added a comment -

        Additional ticket information from GitHub

        This ticket was referenced in the following commits:
        Show
        ramon.fernandez Ramon Fernandez added a comment - Additional ticket information from GitHub This ticket was referenced in the following commits: 8723e7c362ac33ba4fe4e05c404d2e846134d700 6223e0707e258c8fc5c6c72b4825146889db8353 f0138353697d8706bd1f26e83b9fff8f4e83af8d

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              1 year, 48 weeks, 6 days ago
              Date of 1st Reply: