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

All ASSERTs should fail hard if they're on an unsafe thread

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • ALL

      From SERVER-53035: identify ASSERTs that need to be fixed by changing ASSERT so that even if it passes, it will fail unless it is running on a safe thread.

      An ASSERT failure from a non-main thread is going to throw an exception that the thread callback can't catch, and so the test will std::terminate. ASSERT statements always pass (or the test would be red), but there's a difference between an aborted test and a failed test. If you wanted an aborted test you'd use an invariant.

       

       

      To identify ASSERT statements that are misplaced, perhaps we can just fail ALL ASSERTS from an unsafe thread to identify the dangerous tests before they bite.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: