[SERVER-34307] replace invariant(false) with MONGO_UNREACHABLE Created: 04/Apr/18 Updated: 29/Oct/23 Resolved: 05/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.4 |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Benety Goh | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Repl 2018-04-09 | ||||||||
| Participants: | |||||||||
| 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 |
| Comments |
| Comment by Githook User [ 18/Apr/18 ] |
|
Author: {'email': 'mathias@10gen.com', 'name': 'Mathias Stearn', 'username': 'RedBeard0531'}Message: This includes a partial revert of 80f409d1311eb8d20251d17be474aff382538b84 |
| Comment by Githook User [ 05/Apr/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}Message: |