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

Recovery fails due to a missing file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None
    • # Replies:
      4
    • Last comment by Customer:
      true

      Description

      I've seen failures recovering after a hard system crash with messages like:

      2015-07-02T15:10:36.861-0400 E STORAGE  [initandlisten] WiredTiger (2) [1435864236:861392][2600:0x7f6b3b048b80], file:collection-181-5805430730046625089.wt: /home/jonathan/pt-315/data/wiredTiger/collection-181-5805430730046625089.wt: No such file or directory
      2015-07-02T15:10:36.861-0400 E STORAGE  [initandlisten] WiredTiger (2) [1435864236:861464][2600:0x7f6b3b048b80], file:collection-181-5805430730046625089.wt: Operation failed during recovery: No such file or directory
      

      The application is doing:

      • Create a checkpoint
      • Create a new table
      • Write some content into the new table

      Then the system crashes without flushing buffered I/O

        Issue Links

          Activity

          Hide
          alexander.gorrod Alexander Gorrod added a comment -

          It appears to me as though the problem is due to us not doing a directory sync when creating a new file. So Linux doesn't guarantee that the file will be present after a crash.

          Show
          alexander.gorrod Alexander Gorrod added a comment - It appears to me as though the problem is due to us not doing a directory sync when creating a new file. So Linux doesn't guarantee that the file will be present after a crash.
          Hide
          alexander.gorrod Alexander Gorrod added a comment -

          I've coded up a simple fix here:
          https://github.com/wiredtiger/wiredtiger/pull/2064

          Show
          alexander.gorrod Alexander Gorrod added a comment - I've coded up a simple fix here: https://github.com/wiredtiger/wiredtiger/pull/2064
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}

          Message: WT-2008 Fix a bug in recovery where a file create went missing.

          The problem was that a hard system crash could cause a file to not
          be created, even though it had been synced. The solution is to do a
          directory sync each time a new file is created.
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/f911881830a66b5a1e4cea6846f9b03f10bdb738

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'} Message: WT-2008 Fix a bug in recovery where a file create went missing. The problem was that a hard system crash could cause a file to not be created, even though it had been synced. The solution is to do a directory sync each time a new file is created. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/f911881830a66b5a1e4cea6846f9b03f10bdb738
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: Merge pull request #2064 from wiredtiger/create-always-dir-sync

          WT-2008 Fix a bug in recovery where a file create went missing.
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/911158c424981af200189001ae1d76450bccf97d

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Merge pull request #2064 from wiredtiger/create-always-dir-sync WT-2008 Fix a bug in recovery where a file create went missing. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/911158c424981af200189001ae1d76450bccf97d

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 41 weeks, 3 days ago
                Date of 1st Reply: