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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.7, 4.0.1, 4.1.1, WT3.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage NYC 2018-07-02
    • v3.6

      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.

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

              Created:
              Updated:
              Resolved: