Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39769

Empty WiredTiger.backup causes restore from backup to fail

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.21, 4.0.6
    • Component/s: WiredTiger
    • ALL
      1. Call db.fsyncLock()
      2. Take FS snapshot shortly after without syncing to disk
      3. Restore snapshot
      4. WiredTiger.backup is zero bytes
    • Storage Engines 2019-03-11

      After calling the db.fsyncLock() command and it returning, the WiredTiger.backup file is created. After waiting 20 seconds I make a Google Cloud disk snapshot. Restoring from this snapshot shows that WiredTiger.backup is zero bytes. This causes MongoDB to not be able to restore correctly on startup and there being no databases. Adding a manual call to the Linux sync command before making the snapshot remedies this. It seems like MongoDB should be syncing WiredTiger.backup to disk before the db.fsyncLock() command returns.

      Ubuntu 18.04

            Assignee:
            sue.loverso@mongodb.com Susan LoVerso
            Reporter:
            lukejolly Luke Jolly
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: