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

Shards starting or entering primary mode may get stuck if no CSRS config hosts are available

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.4
    • Component/s: Sharding
    • Labels:
      None
    • ALL

      If a shard node using a CSRS config server has ever been a chunk donor in a migration, that node will have a minOpTime document stored with the config server's optime from the last migration.

      Upon startup or becoming primary, if there is a minOpTime document, the shard starts initializing the ShardingState machinery in order to prime it with the minimal config server optime.

      This initialization will never complete if none of the CSRS hosts are available and we will keep retrying infinitely. The reason the initialization gets stuck is because we try to reload the list of shards.

      We should change the code so that we can initialize and set the min optime and not reload the list of shards until it becomes necessary.

        1. ismaster_csrs_configsvr_not_restart.js
          2 kB
          Linda Qin
        2. ismaster_csrs_configsvr_restart.js
          2 kB
          Linda Qin

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: