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

Increase log severity for tassert when diagnostics are enabled

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • None
    • Diagnostics
    • None
    • Fully Compatible
    • Service Arch 2021-05-03
    • 27

    Description

      We should increase the severity of tripwire assertions (e.g., to LOGV2_ERROR) when testing diagnostics are enabled. Current implementation logs the incident and only logs an error message when the process terminates:

      void tassertFailed(const Status& status, SourceLocation loc) {
          assertionCount.condrollover(assertionCount.tripwire.addAndFetch(1));
          LOGV2(TRIPWIRE_ASSERTION_ID,
                "Tripwire assertion",
                "error"_attr = status,
                "location"_attr = SourceLocationHolder(std::move(loc)));
          breakpoint();
          error_details::throwExceptionForStatus(status);
      }
      

      This complicates diagnostics as the line that warns about the failure doesn't have any information about the real cause of failure, and often the log line with details on the failure are stored in separate log files.

      Attachments

        Activity

          People

            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: