Aggregation with $out can leak a cursor if the target collection is sharded

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Query
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In mongos, we prevent $out to a sharded collection here. However if mongos' cache is stale and it believes the collection is unsharded or doesn't exist, then we will go ahead and establish shard cursors.

      If the source collection is also sharded, then mongos will also establish a merging cursor which will run the $out on the primary shard. If this fails (in this case mongod will find the target collection to be sharded and assert here) then the original shard cursors will be leaked.

            Assignee:
            Backlog - Query Team (Inactive)
            Reporter:
            Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: