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

Cannot restart if 0-length WiredTiger file

    • Type: Icon: Task Task
    • Resolution: Done
    • WT2.5.2
    • Affects Version/s: None
    • Component/s: None

      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.

            Assignee:
            sue.loverso@mongodb.com Susan LoVerso
            Reporter:
            sue.loverso@mongodb.com Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: