Downgrade invariant to tassert in ShardServerCatalogCacheLoader::getSelfShardId

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • CAR Team 2026-03-16
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

       getSelfShardId() in shard_server_catalog_cache_loader.cpp uses a hard invariant to assert that ShardingState is enabled.

      Due to a race window in initializeFromShardIdentity() between _initFunc() (which makes Grid::isInitialized() true) and setRecoveryCompleted() (which makes ShardingState::enabled() true), any concurrent thread that accesses the CatalogCache during this window will hit this invariant and crash the node.

      Downgrading to tassert prevents a hard crash while still surfacing the error, allowing callers to handle it gracefully.

            Assignee:
            Pol Pinol
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: