Use MONGO_UNREACHABLE for unimplemented VirtualCollectionImpl functions

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The unimplementedTassert helper that is use in most function definitions in VirtualCollectionImpl has a few problems:

      • It is not marked with MONGO_COMPILER_NORETURN, so each function has to return something.
      • The tassert code is not unique, so it is not possible to tell which function was called.
      • A backtrace is not generated which means it is impossible to tell which unimplemented function was called.

      MONGO_UNREACHABLE solves these problems. I also don't believe that calling unimplemented functions is expected to be a common problem in our code that we need to use tassert to protect the process from crashing.

            Assignee:
            Yoon Soo Kim (Inactive)
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: