[SERVER-37420] Corrupted WiredTiger.wt Created: 02/Oct/18  Updated: 13/Dec/18  Resolved: 04/Oct/18

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: 3.4.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Gilles Degols Assignee: Nick Brewer
Resolution: Done Votes: 1
Labels: envns, wtc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File WiredTiger.turtle     File WiredTiger.wt     Text File stacktrace.txt    
Operating System: Linux
Participants:

 Description   

As some other people, our WiredTiger.wt has been corrupted during a maintenance operation. And unfortunately we cannot restore the data as we had synchronization problems with the secondary. 

Restarting the mongod instance with the --repair does not go further than without it. 

Apparently there is a tool made by MongoDB to repair it. Would it be possible for someone to use it on the attached files? 



 Comments   
Comment by Nick Brewer [ 04/Oct/18 ]

gdegols Glad to hear you got it working - some considerations to take to prevent this sort of issue in the future:

-Nick

Comment by Gilles Degols [ 04/Oct/18 ]

Hello Nick,

Thank you for the explanation. We considered the possibility to install mongodb 4.0.3, but this seems a bit dangerous for our client. Instead, we developed a small script to directly read wired tiger files and retrieve data from it. This allows us to retrieve any data from any specific collection without using the WiredTiger.wt, only the data file. 

You can close the ticket. 

Thank you again for your time and your very fast reply. We'll keep that procedure in mind, and will try to upgrade our MongoDB instances everywhere to the latest version asap. 

Gilles

Comment by Nick Brewer [ 02/Oct/18 ]

gdegols I suggest that you perform a full repair yourself using some enhanced capability we recently introduced for the repair option:

Important: Before you start this process, take a backup of your dbpath via a manual copy of the directory, or a filesystem snapshot.

  • Download the 4.0.3-rc0
  • From the unpacked directory, run mongod --repair, and point it to your dbpath:

       bin/mongod --repair --dbpath /path/to/corrupted/dbpath
       

  • Once the repair completes, stop the 4.0 nightly mongod, and then start your regular 3.4 installation as you normally would.

Please let us know how it goes - if you run into any issues, we'd be happy to help.

-Nick

Generated at Thu Feb 08 04:45:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.