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

Convert invariants to tassert in Balancer code

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2024-02-05, CAR Team 2024-02-19, CAR Team 2024-03-04
    • 2

      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.

            Assignee:
            adam.farkas@mongodb.com Wolfee Farkas
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: