[SERVER-35629] Use WiredTiger salvage API for repairing metadata files Created: 15/Jun/18  Updated: 29/Oct/23  Resolved: 18/Sep/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.4

Type: Task Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: nyc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on WT-4283 Restore WT_ERROR and use a corrupt flag Closed
depends on WT-4156 Add new wiredtiger_salvage top level API Closed
Related
is related to SERVER-28734 Recover WiredTiger data files when la... Closed
is related to WT-4310 Add option to not abort in diagnostic... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: Storage NYC 2018-09-10, Storage NYC 2018-09-24
Participants:
Linked BF Score: 0

 Description   

WT will be adding functionality to salvage metadata information that would provide a similar result to the original goal of this ticket which is left quoted.

When running MongoDB with the --repair flag and we find that the WiredTiger.wt metadata file is corrupted, we should attempt to salvage the metadata file.

Because the WiredTiger.wt file cannot be salvaged directly, this process might work like so (similar to the repair-wt.sh script used in support).

  • Create a new WiredTiger db in a new directory with an empty table named "tmp"
  • Copy the WiredTiger.wt file into the new db directory as tmp.wt
  • Run salvage on "tmp" in the new db directory
  • Extract the salvaged checkpoint information for "tmp" from the new db's metadata
  • Copy the salvaged tmp.wt back as WiredTiger.wt to the original db path
  • Replace the checkpoint information in WiredTiger.turtle with the salvaged checkpoint information


 Comments   
Comment by Githook User [ 20/Sep/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-35629 Use WiredTiger salvage API to repair corrupt metadata

(cherry picked from commit 3acf1742d7bcec78997614edb1e8ef26ccf2331f)
Branch: v4.0
https://github.com/mongodb/mongo/commit/27f5700f717cc0ecd5974993b0a8c80e41645cb9

Comment by Githook User [ 20/Sep/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-35629 Use WiredTiger salvage API for repairing metadata files

(cherry picked from commit fa156c6131d9190760eaaaf09a57eab54325fffe)
Branch: v4.0
https://github.com/10gen/mongo-enterprise-modules/commit/68d988b840cb67a39674bcfe63dba4eefca00ff0

Comment by Githook User [ 18/Sep/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-35629 Use WiredTiger salvage API to repair corrupt metadata
Branch: master
https://github.com/mongodb/mongo/commit/3acf1742d7bcec78997614edb1e8ef26ccf2331f

Comment by Githook User [ 14/Sep/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: Revert "SERVER-35629 Use WiredTiger salvage API to repair corrupt metadata"

This reverts commit f92a1d2aaf0f4d2874f64a5e1b3c12fc66e39d4d.
Branch: master
https://github.com/mongodb/mongo/commit/d749501e072eb1c30e064ea749e0e81b988e389f

Comment by Githook User [ 14/Sep/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-35629 Use WiredTiger salvage API to repair corrupt metadata
Branch: master
https://github.com/mongodb/mongo/commit/f92a1d2aaf0f4d2874f64a5e1b3c12fc66e39d4d

Comment by Githook User [ 14/Sep/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-35629 Use WiredTiger salvage API for repairing metadata files
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/fa156c6131d9190760eaaaf09a57eab54325fffe

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