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

Config Server step down could lead to a failure while sharding a system collection

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • 4.0 Required
    • Sharding
    • Sharding EMEA
    • ALL
    • 8

    Description

      In 4.0 when sharding a collection in the config database, we check if the collection is empty, however, this operation is only checking the status of the runCommand call, but it is not checking the response object (something like getEffectiveStatus does), so the following scenario might happen:

      1. The config server send the count command to itself, using the runCommand function
      2. The primary steps down
      3. The command and it's retries fail, storing the result in the commandStatus field
      4. After returning the status check succeeds, trying to access an inexistent field

      We could add a similar check like it is done when creating the indexes or simply change the code to use getEffectiveStatus.

      Attachments

        Activity

          People

            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: