[SERVER-229] repairDatabase() does not handle infinite chaining loops Created: 11/Aug/09  Updated: 06/Dec/22  Resolved: 14/Sep/18

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

Type: Bug Priority: Major - P3
Reporter: Dwight Merriman Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 5
Labels: mmapv1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-980 single server durability Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

If the doubly linked list between objects was in the process of updating when db terminated, you can get an infinite loop of objects when queried - and repair doesn't handle this.

Note: it may be better to add durability and get rid of repair than to fix this.



 Comments   
Comment by Leonid Evdokimov [ 17/Jun/14 ]

I run mongod in update-heavy installation with disabled journal using mongod as sharded key-value storage with secondary indexes. It is ok to loose some not-so-predictable amount of data in case of server failure, so I assumed that ``mongod --repair`` works and added it in pre-start upstart script. This week one of my servers crashed. Reboot launched repair process that created 50Gb+ temporary files to repair 500 MiB datadir leading to out-of-space condition.

I can't suggest good loop detection, but safety belt preventing out-of-space seems to be trivial: stop `mongod --repair` process as soon as temporary files size becomes significantly larger than repaired files size.

P.S. That was db version v2.4.9

Comment by Eliot Horowitz (Inactive) [ 17/Dec/10 ]

given durability is going in 1.8, not sure how important this is

Comment by Dwight Merriman [ 07/Apr/10 ]

priority of this ticket could be much lower if server-980 is done

Generated at Thu Feb 08 02:53:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.