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

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Sharding 2021-02-08
    • 59
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Marcos José Grillo Ramirez
            Reporter:
            Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: