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

Use MONGO_UNREACHABLE for unimplemented VirtualCollectionImpl functions

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

      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:
            yoonsoo.kim@mongodb.com Yoon Soo Kim
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: