mongodump --repair only scans forward under WiredTiger

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.8.0-rc0
    • Component/s: Storage, Tools
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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)
      

            Assignee:
            Michael O'Brien
            Reporter:
            Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: