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

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

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

      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@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: