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

Race condition in the `shardCollectionLegacy` logic due to usage of CatalogCache instead of CSS

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2021-02-08
    • Linked BF Score:
      59

      Description

      When the legacy shardCollection logic runs, it does an optimistic check of whether the collection is already sharded with the same options using direct reads from the config server. However, later on it uses the CatalogCache in order to return information about the collection.

      If the collection was sharded from another node, the CatalogCache is not guaranteed to be up to date and it is possible that it returns that a collection is unsharded (even though it is sharded on the config server).

      Because of this, the check needs to be done using the CSS instead of direct reads.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marcos.grillo Marcos José Grillo Ramirez
              Reporter:
              kaloian.manassiev Kaloian Manassiev
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: