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

Convert invariants to tassert in Balancer code

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Catalog and Routing
    • CAR Team 2024-02-05, CAR Team 2024-02-19
    • 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.

      Attachments

        Activity

          People

            paolo.polato@mongodb.com Paolo Polato
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: