[SERVER-16216] mongodump --repair only scans forward under WiredTiger Created: 18/Nov/14  Updated: 10/Dec/14  Resolved: 18/Nov/14

Status: Closed
Project: Core Server
Component/s: Storage, Tools
Affects Version/s: 2.8.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Michael O'Brien
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 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)



 Comments   
Comment by Eliot Horowitz (Inactive) [ 18/Nov/14 ]

Repair cursors are not going to be the way we handle corrupted WT docs. They were pretty suspect before, and remain so.
I.e. it can return garbage docs that are valid bson, but corrupt and ticking time bombs.
mongod --repair will be the preferred route.

Comment by Ramon Fernandez Marina [ 18/Nov/14 ]

mpobrien, should this ticket be moved to the TOOLS project? Or is there some server support needed for this to work?

Generated at Thu Feb 08 03:40:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.