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)
|