[SERVER-56322] Increase log severity for tassert when diagnostics are enabled Created: 23/Apr/21  Updated: 29/Oct/23  Resolved: 28/Apr/21

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2021-05-03
Participants:
Linked BF Score: 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.



 Comments   
Comment by Githook User [ 28/Apr/21 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-56322 Increase log severity for tassert
Branch: master
https://github.com/mongodb/mongo/commit/0ff6ae4f5e0a69a36610b0ea645ad2dd48132926

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