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

Use WiredTiger.turtle.set if it exists but WiredTiger.turtle does not

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.7, 4.0.1, 4.1.1, WT3.2.0
    • None
    • None
    • Storage NYC 2018-07-02
    • v3.6

    Description

      I've encountered a situation where, on Windows, the rename of WiredTiger.turtle.set to WiredTiger.turtle crashed in the middle. The comment in os_win/os_fs.c:99 discusses that MoveFileExW is not atomic and we appear to have caught it in the middle of that operation. On restart the situation we end up with is that no WiredTiger.turtle file exists and we attempt to recreate the metadata. The result is that some MongoDB tables are not recovered into the new metadata, i.e. the recreate of it is incomplete and a best effort.

      If I manually finish the rename and move WiredTiger.turtle.set to WiredTiger.turtle before running recovery all is well with the database.

      Right now, in wt_turtle_init we unconditionally remove any WiredTiger.turtle.set file before looking at the state of the turtle file, backup files, etc. It seems like we may want to make that removal conditional and consider attempting to detect this situation and completing the rename internally rather than removing.

      Attachments

        Activity

          People

            keith.bostic@mongodb.com Keith Bostic
            sue.loverso@mongodb.com Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: