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

replace invariant(false) with MONGO_UNREACHABLE

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.4
    • Component/s: Internal Code
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Repl 2018-04-09

      Description

      We use invariant(false) a lot in the codebase when we really mean MONGO_UNREACHABLE. Using the MONGO_UNREACHABLE macro also sends a signal to the compiler that execution will not proceed past that location in the code (See SERVER-29780 for example).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              benety.goh Benety Goh
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: