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

Certain aggregation commands with merging on mongos can leak cursors on mongod

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.6.0-rc4
    • Affects Version/s: 3.6.0-rc1
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Query 2017-11-13
    • 0

      This was originally found by running the bestbuy aggregation workload against a sharded cluster (see attached BF ticket), but also reproduces with a local setup outside of DSI. The consistently reproducing test case does the following:

      1. Setup 3-node sharded cluster with a single mongos
      2. Presplit the data according to what is done here
      2. Shard the collection and move chunks to ensure each shard has at least one chunk
      3. Insert 200 documents (exact number probably doesn't matter) near each split point
      4. Run an aggregate command with the following pipeline: [{$match: {type: "Music"}}, {$limit: 100}] in a loop

      The cursor leak typically occurs within 30 seconds of starting the test. It's important to note that the issue does not reproduce when setting the parameter internalQueryProhibitMergingOnMongoS, thus indicating that it appears to be a regression related to aggregation's merging on mongos.

            Assignee:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Reporter:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: