[SERVER-73172] Replace invariant with tassert in src/mongo/db/query code Created: 21/Jan/23 Updated: 08/Mar/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | neweng, quick-tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Participants: | |||||||||
| Description |
|
We should only replace invariants if the operation can report an error to the users cleanly and does not impact any subsequent operations. A few examples where this won't be the case is when the invariant it based on a state that is not limited to the current operation, like a lock state, collection catalog state etc. Additionally, if the invariant is to protect against a memory leak, we cannot replace it with a tassert. |