Shard node stepdown may delete collection metadata which is in use by active cursors

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.3.14
    • Affects Version/s: 3.3.12
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2016-09-19
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Cursors opened against sharded collections will contain a pointer to the CollectionMetadata, which corresponds to the version of the collection they are using and also a "lease" on that metadata so the range deleter will not clean it up while the cursor is still active.

      The stepdown code, however, indiscriminately clears the CollectionShardingState map and as a result these queries no longer reference a valid CollectionMetadata object.

      Instead of clearing the map, the stepdown code should just mark the collections as not sharded.

            Assignee:
            Kaloian Manassiev
            Reporter:
            Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: