[SERVER-24165] Validate should report records with invalid BSON in its command result Created: 15/May/16  Updated: 09/Sep/21  Resolved: 09/Jul/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.0.12
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Angela Shulman Assignee: Shin Yee Tan
Resolution: Done Votes: 3
Labels: intern_validate_improvements
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Issue Links:
Backports
Depends
is depended on by SERVER-49341 Validate repair mode should delete re... Closed
Duplicate
is duplicated by SERVER-21701 mongod --repair and db.repairDatabase... Closed
Related
is related to SERVER-52609 Append corruptRecords to validate res... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-06-29, Execution Team 2020-07-13
Participants:

 Description   

Hi,

Our MMAP 3.0.12 database is corrupted but we can't repair it using 3.0.12 tools.

We have tried a number of techniques. Here are three:

(1) We performed an initial sync which failed because of this error:

I -        [rsSync] Assertion: 28531:Cloner: found corrupt document in redacted.guides: bson length doesn't match what we found in object with _id: ObjectId('56b54dd86ae840d1d150edaa')
E REPL     [rsSync] 28531 Cloner: found corrupt document in redacted.guides: bson length doesn't match what we found in object with _id: ObjectId('56b54dd86ae840d1d150edaa')

(2) We ran db.repairDatabase() but this failed because of this error:

> db.repairDatabase()
{
	"errmsg" : "exception: BSONElement: bad type 126",
	"code" : 10320,
	"ok" : 0
}

(3a) We ran `mongodump --repair` on the corrupted collection (used the '-c' option)

% mongodump -h localhost:27017 -d redacted -c guides --repair
2016-05-15T11:25:01.385-0700    writing repair of redacted.guides to dump/redacted/guides.bson
2016-05-15T11:28:17.799-0700            repair cursor found 161006 documents in redacted.guides
2016-05-15T11:28:17.801-0700    writing redacted.guides metadata to dump/redacted/guides.metadata.json
2016-05-15T11:28:17.870-0700    done dumping redacted.guides (0 documents)

Then we attempted to mongorestore the collection:

(3b) Running `mongorestore` (using the '-c' option) failed with "insertion error: EOF".

% mongorestore -h localhost:27017 -d redacted -c guides2 dump/redacted/guides.bson
 
2016-05-15T11:29:47.288-0700    checking for collection data in dump/redacted/guides.bson
2016-05-15T11:29:47.291-0700    reading metadata file from dump/redacted/guides.metadata.json
2016-05-15T11:29:47.292-0700    restoring redacted.guides2 from file dump/redacted/guides.bson
2016-05-15T11:29:50.423-0700    [........................]  redacted.guides2  64.0 MB/1.7 GB  (3.7%)
2016-05-15T11:29:53.290-0700    [#.......................]  redacted.guides2  80.0 MB/1.7 GB  (4.6%)
2016-05-15T11:29:56.290-0700    [#.......................]  redacted.guides2  143.9 MB/1.7 GB  (8.3%)
2016-05-15T11:29:59.330-0700    [##......................]  redacted.guides2  189.0 MB/1.7 GB  (10.9%)
2016-05-15T11:30:02.326-0700    [##......................]  redacted.guides2  213.1 MB/1.7 GB  (12.2%)
2016-05-15T11:30:05.355-0700    [###.....................]  redacted.guides2  271.9 MB/1.7 GB  (15.6%)
2016-05-15T11:30:08.290-0700    [####....................]  redacted.guides2  303.9 MB/1.7 GB  (17.5%)
2016-05-15T11:30:11.371-0700    [####....................]  redacted.guides2  351.9 MB/1.7 GB  (20.2%)
2016-05-15T11:30:14.325-0700    [#####...................]  redacted.guides2  383.8 MB/1.7 GB  (22.0%)
2016-05-15T11:30:17.435-0700    [######..................]  redacted.guides2  447.8 MB/1.7 GB  (25.7%)
2016-05-15T11:30:20.438-0700    [#######.................]  redacted.guides2  511.7 MB/1.7 GB  (29.4%)
2016-05-15T11:30:23.294-0700    [#######.................]  redacted.guides2  527.6 MB/1.7 GB  (30.3%)
2016-05-15T11:30:26.290-0700    [########................]  redacted.guides2  591.4 MB/1.7 GB  (34.0%)
2016-05-15T11:30:29.315-0700    [#########...............]  redacted.guides2  655.1 MB/1.7 GB  (37.6%)
2016-05-15T11:30:32.294-0700    [#########...............]  redacted.guides2  709.3 MB/1.7 GB  (40.7%)
2016-05-15T11:30:33.731-0700    Failed: restore error: redacted.guides2: error restoring from dump/redacted/guides.bson: insertion error: EOF

(3c) We then tried `mongostore --objcheck --drop` but it failed with "invalid object: Document is corrupted"

% mongorestore -h localhost:27017 -d redacted -c guides3 --objcheck dump/redacted/guides.bson
 
2016-05-15T11:32:16.156-0700    checking for collection data in dump/redacted/guides.bson
2016-05-15T11:32:16.810-0700    reading metadata file from dump/redacted/guides.metadata.json
2016-05-15T11:32:16.811-0700    restoring redacted.guides3 from file dump/redacted/guides.bson
2016-05-15T11:32:19.277-0700    [........................]  redacted.guides3  16.7 MB/1.7 GB  (1.0%)
2016-05-15T11:32:22.319-0700    [........................]  redacted.guides3  43.2 MB/1.7 GB  (2.5%)
2016-05-15T11:32:25.423-0700    [#.......................]  redacted.guides3  74.5 MB/1.7 GB  (4.3%)
2016-05-15T11:32:28.189-0700    [#.......................]  redacted.guides3  79.9 MB/1.7 GB  (4.6%)
2016-05-15T11:32:31.359-0700    [#.......................]  redacted.guides3  101.8 MB/1.7 GB  (5.8%)
2016-05-15T11:32:34.698-0700    [#.......................]  redacted.guides3  139.4 MB/1.7 GB  (8.0%)
2016-05-15T11:32:37.219-0700    [#.......................]  redacted.guides3  143.9 MB/1.7 GB  (8.3%)
2016-05-15T11:32:40.333-0700    [##......................]  redacted.guides3  172.4 MB/1.7 GB  (9.9%)
2016-05-15T11:32:43.602-0700    [##......................]  redacted.guides3  193.0 MB/1.7 GB  (11.1%)
2016-05-15T11:32:46.255-0700    [##......................]  redacted.guides3  210.1 MB/1.7 GB  (12.1%)
2016-05-15T11:32:49.552-0700    [###.....................]  redacted.guides3  232.8 MB/1.7 GB  (13.4%)
2016-05-15T11:32:52.621-0700    [###.....................]  redacted.guides3  249.0 MB/1.7 GB  (14.3%)
2016-05-15T11:32:55.341-0700    [###.....................]  redacted.guides3  267.6 MB/1.7 GB  (15.4%)
2016-05-15T11:32:58.348-0700    [####....................]  redacted.guides3  291.4 MB/1.7 GB  (16.7%)
2016-05-15T11:33:01.662-0700    [####....................]  redacted.guides3  315.2 MB/1.7 GB  (18.1%)
2016-05-15T11:33:04.309-0700    [####....................]  redacted.guides3  335.1 MB/1.7 GB  (19.2%)
2016-05-15T11:33:07.336-0700    [#####...................]  redacted.guides3  367.8 MB/1.7 GB  (21.1%)
2016-05-15T11:33:10.220-0700    [#####...................]  redacted.guides3  384.2 MB/1.7 GB  (22.1%)
2016-05-15T11:33:13.261-0700    [#####...................]  redacted.guides3  425.7 MB/1.7 GB  (24.5%)
2016-05-15T11:33:16.220-0700    [######..................]  redacted.guides3  448.5 MB/1.7 GB  (25.8%)
2016-05-15T11:33:19.496-0700    [######..................]  redacted.guides3  487.6 MB/1.7 GB  (28.0%)
2016-05-15T11:33:22.220-0700    [#######.................]  redacted.guides3  527.7 MB/1.7 GB  (30.3%)
2016-05-15T11:33:25.459-0700    [#######.................]  redacted.guides3  571.1 MB/1.7 GB  (32.8%)
2016-05-15T11:33:28.276-0700    [########................]  redacted.guides3  623.4 MB/1.7 GB  (35.8%)
2016-05-15T11:33:31.433-0700    [#########...............]  redacted.guides3  679.5 MB/1.7 GB  (39.0%)
2016-05-15T11:33:34.195-0700    [#########...............]  redacted.guides3  704.4 MB/1.7 GB  (40.5%)
2016-05-15T11:33:34.909-0700    Failed: restore error: redacted.guides3: error restoring from dump/redacted/guides.bson: insertion error: invalid object: Document is corrupted

Let us know what else would be helpful here.

Thanks,
Angela



 Comments   
Comment by Louis Williams [ 10/Feb/21 ]

Validate in all versions validates BSON. This ticket only added a "corruptRecords" section to the validate command output, rather than just logging.

Comment by Githook User [ 09/Jul/20 ]

Author:

{'name': 'Shin Yee Tan', 'email': 'shinyee.tan@mongodb.com'}

Message: SERVER-24165 Validate should report records with invalid BSON
Branch: master
https://github.com/mongodb/mongo/commit/1ccc744fa34d50ca7a9f7e81c9b8e22f2557ae6e

Comment by Eric Milkie [ 19/Jun/19 ]

For this ticket I'm going to redirect it into improving validate and repair:
1. The validate command should check that all data records have valid BSON. It should not crash when encountering bad BSON, but should produce a report of which documents are corrupt.
2. The --repair functionality should report and remove all data records that have invalid BSON.

Comment by Angela Shulman [ 23/May/16 ]

Hi Thomas,

We notice that there is a request to backport to 3.2 and 3.0 - thank you very much. We think this is appropriate given that the issue can involve data loss.  

In the meantime, do you have any suggestions for additional workarounds we can try to repair the corruption?

Best regards,
Angela

Comment by Angela Shulman [ 18/May/16 ]

Thanks Thomas. We'll keep looking out for updates.

Comment by Kelsey Schubert [ 17/May/16 ]

Hi akung0324,

I'm sorry you have encountered this issue on MongoDB 3.0.12. I am sending this ticket to our integration team to triage - please continue to watch for updates.

Thank you,
Thomas

Comment by Angela Shulman [ 17/May/16 ]

Hi Gabriel,

We tried using 2.6.12's mongodump as you suggested. This time there was no error, but 76,599 documents were lost (out of 80,510) as part of the process.

> use redacted
switched to db redacted
> show collections
guides
objectlabs-system
system.indexes
> db.guides.count()
80510

% mongodump -d redacted -c guides --dbpath /mnt/n-ds027017-a0/data/s-ds027017-a0 --directoryperdb --repair 
2016-05-16T18:56:38.435-0700 going to try and recover data from: redacted
2016-05-16T18:56:38.450-0700 trying to recover: redacted.guides
2016-05-16T18:56:38.452-0700 nrecords: 80510 datasize: 1315732000 firstExtent: 0:29000
2016-05-16T18:56:38.452-0700 writing to: dump/redacted/guides.bson
2016-05-16T18:56:41.835-0700 forward extent pass
2016-05-16T18:56:41.835-0700 extent loc: 0:29000
2016-05-16T18:56:41.836-0700 length:8192
2016-05-16T18:56:41.837-0700 wrote 6 documents
2016-05-16T18:56:41.837-0700 extent loc: 0:8b000
2016-05-16T18:56:41.837-0700 length:1048576
2016-05-16T18:56:42.299-0700 wrote 16 documents
2016-05-16T18:56:42.299-0700 extent loc: 0:18b000
2016-05-16T18:56:42.299-0700 length:4194304
2016-05-16T18:56:43.508-0700 wrote 48 documents
2016-05-16T18:56:43.508-0700 extent loc: 0:58b000
2016-05-16T18:56:43.508-0700 length:5664768
2016-05-16T18:56:44.720-0700 [tools] 		Repair Progress: 100/161020	0%	(documents)
2016-05-16T18:56:44.737-0700 wrote 75 documents
2016-05-16T18:56:44.737-0700 extent loc: 0:af2000
2016-05-16T18:56:44.737-0700 length:7651328
2016-05-16T18:56:44.921-0700 wrote 1 documents
2016-05-16T18:56:44.921-0700 extent loc: 0:123e000
2016-05-16T18:56:45.115-0700 length:10330112
2016-05-16T18:56:47.458-0700 [tools] 		Repair Progress: 200/161020	0%	(documents)
2016-05-16T18:56:47.876-0700 wrote 192 documents
2016-05-16T18:56:47.876-0700 extent loc: 0:1c18000
2016-05-16T18:56:47.876-0700 length:13946880
2016-05-16T18:56:50.432-0700 [tools] 		Repair Progress: 400/161020	0%	(documents)
2016-05-16T18:56:51.010-0700 wrote 287 documents
2016-05-16T18:56:51.010-0700 extent loc: 0:29e5000
2016-05-16T18:56:51.010-0700 length:18829312
2016-05-16T18:56:55.289-0700 [tools] 		Repair Progress: 700/161020	0%	(documents)
2016-05-16T18:56:56.984-0700 wrote 393 documents
2016-05-16T18:56:56.985-0700 extent loc: 1:2000
2016-05-16T18:56:56.985-0700 length:25419776
2016-05-16T18:57:01.464-0700 [tools] 		Repair Progress: 1100/161020	0%	(documents)
2016-05-16T18:57:03.793-0700 wrote 459 documents
2016-05-16T18:57:03.793-0700 extent loc: 1:1840000
2016-05-16T18:57:03.793-0700 length:34320384
2016-05-16T18:57:04.547-0700 [tools] 		Repair Progress: 1500/161020	0%	(documents)
2016-05-16T18:57:08.616-0700 [tools] 		Repair Progress: 1600/161020	0%	(documents)
2016-05-16T18:57:13.727-0700 [tools] 		Repair Progress: 1700/161020	1%	(documents)
2016-05-16T18:57:14.591-0700 wrote 698 documents
2016-05-16T18:57:14.591-0700 extent loc: 1:38fb000
2016-05-16T18:57:14.592-0700 length:46333952
2016-05-16T18:57:14.681-0700 wrote 1 documents
2016-05-16T18:57:14.681-0700 extent loc: 2:2000
2016-05-16T18:57:14.682-0700 length:62554112
2016-05-16T18:57:17.137-0700 [tools] 		Repair Progress: 2200/161020	1%	(documents)
2016-05-16T18:57:22.754-0700 [tools] 		Repair Progress: 2300/161020	1%	(documents)
2016-05-16T18:57:27.822-0700 [tools] warning Listener::getElapsedTimeMillis returning 0ms
2016-05-16T18:57:27.824-0700 [tools] 		Repair Progress: 2400/161020	1%	(documents)
2016-05-16T18:57:34.307-0700 [tools] 		Repair Progress: 2500/161020	1%	(documents)
2016-05-16T18:57:36.627-0700 wrote 1732 documents
2016-05-16T18:57:36.627-0700 extent loc: 2:3daa000
2016-05-16T18:57:36.627-0700 length:84451328
2016-05-16T18:57:36.789-0700 wrote 1 documents
2016-05-16T18:57:36.789-0700 extent loc: 2:8e34000
2016-05-16T18:57:36.790-0700 length:114012160
2016-05-16T18:57:36.948-0700 wrote 1 documents
2016-05-16T18:57:36.948-0700 extent loc: 3:2000
2016-05-16T18:57:36.949-0700 length:153919488
2016-05-16T18:57:37.066-0700 wrote 1 documents
2016-05-16T18:57:37.066-0700 extent loc: 3:92cc000
2016-05-16T18:57:37.066-0700 length:207794176
2016-05-16T18:57:37.222-0700 wrote 1 documents
2016-05-16T18:57:37.222-0700 extent loc: 4:2000
2016-05-16T18:57:37.223-0700 length:280522752
2016-05-16T18:57:37.410-0700 wrote 2 documents
2016-05-16T18:57:37.410-0700 extent loc: 4:10b89000
2016-05-16T18:57:37.541-0700 length:378707968
2016-05-16T18:57:37.639-0700 wrote 1 documents
2016-05-16T18:57:37.639-0700 extent loc: 5:2000
2016-05-16T18:57:37.640-0700 length:511258624
2016-05-16T18:57:37.762-0700 wrote 1 documents
2016-05-16T18:57:37.762-0700 extent loc: 5:1ef95000
2016-05-16T18:57:37.945-0700 length:690200576
2016-05-16T18:57:38.611-0700 wrote 22 documents
2016-05-16T18:57:38.611-0700 backwards extent pass
2016-05-16T18:57:38.612-0700 extent loc: 5:1ef95000
2016-05-16T18:57:38.612-0700 length:690200576
2016-05-16T18:57:39.066-0700 wrote 9 documents
2016-05-16T18:57:39.067-0700 extent loc: 5:2000
2016-05-16T18:57:39.067-0700 length:511258624
2016-05-16T18:57:39.071-0700 wrote 1 documents
2016-05-16T18:57:39.071-0700 extent loc: 4:10b89000
2016-05-16T18:57:39.071-0700 length:378707968
2016-05-16T18:57:40.452-0700 wrote 8 documents
2016-05-16T18:57:40.452-0700 extent loc: 4:2000
2016-05-16T18:57:40.452-0700 length:280522752
2016-05-16T18:57:44.419-0700 wrote 23 documents
2016-05-16T18:57:44.419-0700 extent loc: 3:92cc000
2016-05-16T18:57:44.419-0700 length:207794176
2016-05-16T18:57:44.600-0700 wrote 1 documents
2016-05-16T18:57:44.600-0700 extent loc: 3:2000
2016-05-16T18:57:44.601-0700 length:153919488
2016-05-16T18:57:44.762-0700 wrote 1 documents
2016-05-16T18:57:44.762-0700 extent loc: 2:8e34000
2016-05-16T18:57:44.762-0700 length:114012160
2016-05-16T18:57:45.051-0700 wrote 1 documents
2016-05-16T18:57:45.052-0700 extent loc: 2:3daa000
2016-05-16T18:57:45.052-0700 length:84451328
2016-05-16T18:57:45.211-0700 wrote 3 documents
2016-05-16T18:57:45.211-0700 extent loc: 2:2000
2016-05-16T18:57:45.211-0700 length:62554112
2016-05-16T18:57:45.212-0700 [tools] 		Repair Progress: 4000/161020	2%	(documents)
2016-05-16T18:57:45.226-0700 wrote 308 documents
2016-05-16T18:57:45.226-0700 extent loc: 1:38fb000
2016-05-16T18:57:45.226-0700 length:46333952
2016-05-16T18:57:45.523-0700 wrote 3 documents
2016-05-16T18:57:45.523-0700 extent loc: 1:1840000
2016-05-16T18:57:45.524-0700 length:34320384
2016-05-16T18:57:45.524-0700 wrote 2 documents
2016-05-16T18:57:45.524-0700 extent loc: 1:2000
2016-05-16T18:57:45.524-0700 length:25419776
2016-05-16T18:57:45.524-0700 wrote 2 documents
2016-05-16T18:57:45.524-0700 extent loc: 0:29e5000
2016-05-16T18:57:45.525-0700 length:18829312
2016-05-16T18:57:45.525-0700 wrote 3 documents
2016-05-16T18:57:45.525-0700 extent loc: 0:1c18000
2016-05-16T18:57:45.525-0700 length:13946880
2016-05-16T18:57:45.525-0700 wrote 2 documents
2016-05-16T18:57:45.525-0700 extent loc: 0:123e000
2016-05-16T18:57:45.526-0700 length:10330112
2016-05-16T18:57:45.526-0700 wrote 2 documents
2016-05-16T18:57:45.526-0700 extent loc: 0:af2000
2016-05-16T18:57:45.526-0700 length:7651328
2016-05-16T18:57:45.719-0700 wrote 3 documents
2016-05-16T18:57:45.719-0700 extent loc: 0:58b000
2016-05-16T18:57:45.719-0700 length:5664768
2016-05-16T18:57:45.719-0700 wrote 2 documents
2016-05-16T18:57:45.720-0700 extent loc: 0:18b000
2016-05-16T18:57:45.720-0700 length:4194304
2016-05-16T18:57:45.720-0700 wrote 2 documents
2016-05-16T18:57:45.720-0700 extent loc: 0:8b000
2016-05-16T18:57:45.720-0700 length:1048576
2016-05-16T18:57:45.721-0700 wrote 2 documents
2016-05-16T18:57:45.721-0700 extent loc: 0:29000
2016-05-16T18:57:45.721-0700 length:8192
2016-05-16T18:57:45.721-0700 wrote 2 documents
2016-05-16T18:57:45.721-0700 		 4318 documents
2016-05-16T18:57:45.722-0700 [tools] dbexit:
2016-05-16T18:57:45.722-0700 [tools] shutdown: going to close listening sockets...
2016-05-16T18:57:45.722-0700 [tools] shutdown: going to flush diaglog...
2016-05-16T18:57:45.722-0700 [tools] shutdown: going to close sockets...
2016-05-16T18:57:45.723-0700 [tools] shutdown: waiting for fs preallocator...
2016-05-16T18:57:45.723-0700 [tools] shutdown: closing all files...
2016-05-16T18:57:45.741-0700 [tools] closeAllFiles() finished
2016-05-16T18:57:45.741-0700 [tools] shutdown: removing fs lock...
2016-05-16T18:57:45.741-0700 [tools] dbexit: really exiting now

Using 2.6.12's mongorestore:

% mongorestore -d redacted -c guides2 -h localhost:27017 
2016-05-16T19:03:24.495-0700	checking for collection data in dump/redacted/guides.bson
2016-05-16T19:03:24.497-0700	reading metadata file from dump/redacted/guides.metadata.json
2016-05-16T19:03:24.499-0700	restoring redacted.guides2 from file dump/redacted/guides.bson
2016-05-16T19:03:25.303-0700	error: E11000 duplicate key error index: redacted.guides2.$_id_ dup key: { : ObjectId('56d9dabb6ae840d1d1519c1f') }
2016-05-16T19:03:25.705-0700	error: E11000 duplicate key error index: redacted.guides2.$_id_ dup key: { : ObjectId('56b54e666ae840d1d151942e') }
2016-05-16T19:03:25.751-0700	restoring indexes for collection redacted.guides2 from metadata
2016-05-16T19:03:27.030-0700	finished restoring redacted.guides2 (4318 documents)

> db.guides2.count()
3991

Using 3.0.12's mongorestore:

% mongorestore -d redacted -c guides3 -h localhost:27017
 
2016-05-16T19:11:32.750-0700 dump/redacted/guides.bson
2016-05-16T19:11:32.750-0700 	going into namespace [redacted.guides3]
2016-05-16T19:11:32.754-0700 	Created collection redacted.guides3 with options: { "create" : "guides3" }
4318 objects found
2016-05-16T19:11:33.659-0700 	Creating index: { key: { _id: 1 }, name: "_id_", ns: "redacted.guides3" }
2016-05-16T19:11:33.969-0700 	Creating index: { key: { champion_key_riot: 1.0 }, name: "champion_key_riot_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.019-0700 	Creating index: { key: { old_id: 1.0 }, name: "old_id_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.067-0700 	Creating index: { key: { views: 1.0 }, name: "views_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.206-0700 	Creating index: { key: { released_at: 1.0 }, name: "released_at_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.254-0700 	Creating index: { key: { modified_in: 1.0 }, name: "modified_in_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.303-0700 	Creating index: { key: { featured: 1.0 }, name: "featured_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.349-0700 	Creating index: { key: { champ_name: 1.0 }, name: "champ_name_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.397-0700 	Creating index: { key: { name: 1.0 }, name: "name_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.448-0700 	Creating index: { key: { champion_id_riot: 1.0 }, name: "champion_id_riot_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.471-0700 	Creating index: { key: { rating: 1.0 }, name: "rating_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.530-0700 	Creating index: { key: { slug: 1.0 }, name: "slug_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.596-0700 	Creating index: { key: { author_slug: 1.0 }, name: "author_slug_1", ns: "redacted.guides3" }
2016-05-16T19:11:34.644-0700 	Creating index: { key: { author_id: 1, released_at: -1 }, name: "author_id_1_released_at_-1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:34.702-0700 	Creating index: { key: { champion_key_riot: 1, modified_in: -1 }, name: "champion_key_riot_1_modified_in_-1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:34.804-0700 	Creating index: { key: { champion_key_riot: 1, released_at: -1 }, name: "champion_key_riot_1_released_at_-1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:34.861-0700 	Creating index: { key: { champion_key_riot: 1, rating: -1 }, name: "champion_key_riot_1_rating_-1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:34.949-0700 	Creating index: { key: { champion_key_riot: 1, views: -1 }, name: "champion_key_riot_1_views_-1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:35.004-0700 	Creating index: { key: { author_slug: 1, slug: 1 }, name: "author_slug_1_slug_1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:35.092-0700 	Creating index: { key: { featured: 1, modified_in: -1 }, name: "featured_1_modified_in_-1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:35.150-0700 	Creating index: { key: { champion_key_riot: 1, featured: 1, modified_in: -1 }, name: "champion_key_riot_1_featured_1_modified_in_-1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:35.245-0700 	Creating index: { key: { published: 1.0 }, name: "published_1", ns: "redacted.guides3" }
2016-05-16T19:11:35.294-0700 	Creating index: { key: { publised: 1.0, released_at: -1.0 }, name: "publised_1_released_at_-1", ns: "redacted.guides3" }
2016-05-16T19:11:35.351-0700 	Creating index: { key: { released_at: -1.0 }, name: "released_at_-1", ns: "redacted.guides3" }
2016-05-16T19:11:35.399-0700 	Creating index: { key: { published: 1, rating: -1, views: -1 }, name: "published_1_rating_-1_views_-1", ns: "redacted.guides3", background: true }
2016-05-16T19:11:35.489-0700 	Creating index: { key: { champion_key_riot: 1, published: 1, rating: -1, views: -1 }, name: "champion_key_riot_1_published_1_rating_-1_views_-1", ns: "redacted.guides3", background: true }

> use redacted
switched to db redacted
> db.guides3.count()
3991

Thanks,
Angela

Comment by Gabriel Russell (Inactive) [ 16/May/16 ]

Angela,

Thank you for this report.

I have one more thing for you to try. The mongodump from 2.6 has a different repair mechanism, so I think it's worth giving it a try. There are a couple of caveats:

  • It needs to be run with the database down. If you can't shutdown your database, then this solution is not for you.
  • It needs to be run on the same machine as the server, with the same read permissions as the server.
  • It can only operate on one database at a time. If you need to repair more than one database, you'll need to run it once per database.

So, once you download mongodb 2.6, and stop your database, you can run it like so:

mongodump --repair --dbpath /path/to/db --db redacted

with /path/to/db replaced with the dbpath of your server. ( /data/db, by default ) Please refer to the documentation on the 2.6 version of mongodump for more information.

Thank you,
Gabriel

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