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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.7, 4.0.1, 4.1.1, WT3.2.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Storage NYC 2018-07-02
    • Backport Requested:
      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

            • Assignee:
              keith.bostic Keith Bostic
              Reporter:
              sue.loverso Susan LoVerso
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: