[SERVER-82452] Convert invariants to tassert in Balancer code Created: 26/Oct/23  Updated: 06/Feb/24

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

Type: Improvement Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Paolo Polato
Resolution: Unresolved Votes: 0
Labels: car-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Catalog and Routing
Sprint: CAR Team 2024-02-05, CAR Team 2024-02-19
Participants:
Story Points: 2

 Description   

A very rough check reveals that we currently have 45 invariants in balancer code:

$ git grep "invariant(.\+)" src/mongo/db/s/balancer/ | wc -l
 
45

 

As much as possible, we should avoid using invariant and use tasserts instead. This will ensure that we only fail the balancer and restart it, instead of crashing the entire shard primary.


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