Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10017

Remove "run repair" recommendation from error messages

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.5.5
    • None
    • Logging
    • None
    • Fully Compatible

    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.

      Attachments

        Activity

          People

            matt.kangas Matt Kangas
            jantje.daniel Ian Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: