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

mongodump --repair only scans forward under WiredTiger

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.8.0-rc0
    • Storage, Tools
    • None
    • ALL

    Description

      Repair with mmapv1 in 2.6 would scan both forwards and backwards to maximize recovered data. mongodump --repair under WiredTiger only scans forward. This seems to be due to one or both of

      • mongod aborts when the repair cursor hits the damaged region (see SERVER-16215)
      • it looks like forward direction is hard-coded into WiredTigerRecordStore::getIteratorForRepair (see patch for SERVER-16171).

      To demonstrate that forward and backward scanning is possible with corrupted data (and as a potential workaround to this issue), try

      db.c.find().hint({$natural:1}).batchSize(2)
      db.c.find().hint({$natural:-1}).batchSize(2)

      Attachments

        Activity

          People

            mikeo@mongodb.com Michael O'Brien
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: