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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.0 Required
    • Component/s: Sharding
    • Sharding EMEA
    • ALL
    • 8
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: