[SERVER-35627] Repair should re-create missing collection data files from the existing metadata Created: 15/Jun/18  Updated: 29/Oct/23  Resolved: 28/Jun/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.1, 4.1.1

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
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: Storage NYC 2018-07-02
Participants:
Case:

 Description   

When running mongodb with --repair and find that verify returns ENOENT (no such file), we can safely drop the WiredTiger table and re-create it with the same metadata creation string as the original.

The metadata for the ident can be read in with a "metadata:create" cursor before dropping the table.

This should also handle the case the when a collection is missing when started with --directoryperdb.



 Comments   
Comment by Githook User [ 03/Jul/18 ]

Author:

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

Message: SERVER-35627 Repair should recreate missing collection data files with the existing metadata.

(cherry picked from commit c41426385e88d1b8cd08b5fa39f445e184f86dc1)

Conflicts:
src/mongo/db/storage/wiredtiger/wiredtiger_util.h
Branch: v4.0
https://github.com/mongodb/mongo/commit/b7ae2f196e132302fbd409bd6024a1f5063da2f0

Comment by Githook User [ 28/Jun/18 ]

Author:

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

Message: SERVER-35627 Repair should recreate missing collection data files with the existing metadata.
Branch: master
https://github.com/mongodb/mongo/commit/c41426385e88d1b8cd08b5fa39f445e184f86dc1

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