[SERVER-70222] Use MONGO_UNREACHABLE for unimplemented VirtualCollectionImpl functions Created: 05/Oct/22  Updated: 27/Oct/23  Resolved: 27/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Yoon Soo Kim
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 Description   

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.


Generated at Thu Feb 08 06:15:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.