[SERVER-10017] Remove "run repair" recommendation from error messages Created: 25/Jun/13  Updated: 27/Oct/15  Resolved: 20/Dec/13

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

Type: Improvement Priority: Minor - P4
Reporter: Ian Daniel Assignee: Matt Kangas
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on DOCS-1862 Page in manual needed on how to deal ... Closed
Related
is related to SERVER-9995 corruption on primaries after upgrade... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Some server error messages contain recommendations to run repair, or to consider running repair.

We should remove these recommendations to run repair. A repair removes inconsistent/corrupt data. Depending on the cause of the problem and the user's configuration, there may be better ways of recovering from the problem than by running repair. For example, in some cases, it might be possible to re-sync from another node in a replica set.

src/mongo/db/database.cpp contains two massert messages that recommend running repair:

massert( 15924 , str::stream() << "getFile(): bad file number value " << n << " (corrupt db?): run repair", false);

massert( 10295 , "getFile(): bad file number value (corrupt db?): run repair", false);

src/mongo/db/btree.cpp and src/mongo/db/pdfile.cpp contain recommendations to consider running repair:

msgasserted(15898, str::stream() << "error in index possibly corruption consider repairing " << line);

ss << "bad offset:" << ofs << " accessing file: " << mmf.filename() << " - consider repairing database";

(There might be other occurrences of similar messages.)

Even suggesting "consider repairing database" seems sub-optimal. If we need to make a recommendation, we should point to documentation that describes options when a database looks corrupt. e.g. syncing from a known good node.



 Comments   
Comment by Matt Kangas [ 20/Dec/13 ]

Progress on docs proceeding in DOCS-1862

Comment by Githook User [ 20/Dec/13 ]

Author:

{u'username': u'kangas', u'name': u'Matt Kangas', u'email': u'matt.kangas@mongodb.com'}

Message: SERVER-10017 Remove "run repair" recommendation from error messages

"repair" is rarely the best course of action in a data loss scenario,
and we don't want users going down that path by accident. Point users
to documentation instead.
Branch: master
https://github.com/mongodb/mongo/commit/15727f68617036f50194703267bcd134a9bad05e

Comment by Ian Daniel [ 04/Sep/13 ]

Hi Matt,

I think we could use the page that Sam suggests, but I believe it would need some changes. I have outlined the changes in DOCS-1862.

Kind regards,
Ian

Comment by Matt Kangas [ 30/Aug/13 ]

jantje.daniel - please confirm that the URL Sam mentioned above is sufficient for the purposes of this ticket. (e.g. the log messages in question)

Comment by Sam Kleinman (Inactive) [ 29/Aug/13 ]

I think the relevant document exists already at: http://docs.mongodb.org/manual/tutorial/recover-data-following-unexpected-shutdown/

You can include the following dochub url http://dochub.mongodb.org/core/data-recovery in the server code base.

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