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.

        Attachments

          Activity

            People

            • Assignee:
              sue.loverso Sue LoVerso
              Reporter:
              sue.loverso Sue LoVerso
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: