_shardsvrCheckMetadataConsistencySecondaryParticipant should explicitly wait for ShardingState to be initialized

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2026-08-03
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The handler of the test-only _shardsvrCheckMetadataConsistencySecondaryParticipant command requires the ShardingState to be initialized to produce its response.

      Such a condition can only be satisfied when the shard identity document gets read and installed (a step that may occur during different phases of the mongod startup sequence, depending on multiple factors).

      To ensure that _shardsvrCheckMetadataConsistencySecondaryParticipant never fails with a ShardingStateNotInitialized error, the command handler should explicitly invoke ShardingState::awaitClusterRoleRecovery().

            Assignee:
            Paolo Polato
            Reporter:
            Paolo Polato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: