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

$sort stage in aggregation doesn't call scoped connections done ()

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      Hide

      sh.enableSharding("test")
      sh.shardCollection("test.shard",

      { _id : "hashed" }

      )
      db.shard.aggregate({$match:{ a:1 }}, {$sort: {_id:1}}, {$group:{_id:"$a"}})
      Check the logs of the database's primary shard for scoped connections being dropped.

      Show
      sh.enableSharding("test") sh.shardCollection("test.shard", { _id : "hashed" } ) db.shard.aggregate({$match:{ a:1 }}, {$sort: {_id:1}}, {$group:{_id:"$a"}}) Check the logs of the database's primary shard for scoped connections being dropped.
    • Sprint:
      Quint Iteration 7

      Description

      The sort stage doesn't properly close the connection. This causes it to be marked as bad and not returned to the pool which leads to many log lines and connection churn. Potentially gigs per hour of log lines on a small cluster.

        Issue Links

          Activity

          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: SERVER-19464 Add a way to explicitly kill a DBClientCursor before destruction
          Branch: master
          https://github.com/mongodb/mongo/commit/0476dec3ae310f768ae7fd31418a4c8aa7c24506

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: SERVER-19464 Add a way to explicitly kill a DBClientCursor before destruction Branch: master https://github.com/mongodb/mongo/commit/0476dec3ae310f768ae7fd31418a4c8aa7c24506
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: SERVER-19464 Have DSMergeCursors correctly cleanup _cursors in dispose()

          This involves killing the cursor and returning the connection to the pool.
          This commit also ensures that DSSort calls dispose on its source as needed.
          Branch: master
          https://github.com/mongodb/mongo/commit/5c20356061c19b7343cb9aab7398238581f0b600

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: SERVER-19464 Have DSMergeCursors correctly cleanup _cursors in dispose() This involves killing the cursor and returning the connection to the pool. This commit also ensures that DSSort calls dispose on its source as needed. Branch: master https://github.com/mongodb/mongo/commit/5c20356061c19b7343cb9aab7398238581f0b600
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: SERVER-19464 Add a way to explicitly kill a DBClientCursor before destruction
          Branch: master
          https://github.com/mongodb/mongo/commit/0476dec3ae310f768ae7fd31418a4c8aa7c24506

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: SERVER-19464 Add a way to explicitly kill a DBClientCursor before destruction Branch: master https://github.com/mongodb/mongo/commit/0476dec3ae310f768ae7fd31418a4c8aa7c24506
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: SERVER-19464 Have DSMergeCursors correctly cleanup _cursors in dispose()

          This involves killing the cursor and returning the connection to the pool.
          This commit also ensures that DSSort calls dispose on its source as needed.
          Branch: master
          https://github.com/mongodb/mongo/commit/5c20356061c19b7343cb9aab7398238581f0b600

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: SERVER-19464 Have DSMergeCursors correctly cleanup _cursors in dispose() This involves killing the cursor and returning the connection to the pool. This commit also ensures that DSSort calls dispose on its source as needed. Branch: master https://github.com/mongodb/mongo/commit/5c20356061c19b7343cb9aab7398238581f0b600
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: SERVER-19464 Add a way to explicitly kill a DBClientCursor before destruction

          (cherry picked from commit 0476dec3ae310f768ae7fd31418a4c8aa7c24506)
          Branch: v2.6
          https://github.com/mongodb/mongo/commit/bd585fa7ac8fb51df967116e360f5fc0e8b97596

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: SERVER-19464 Add a way to explicitly kill a DBClientCursor before destruction (cherry picked from commit 0476dec3ae310f768ae7fd31418a4c8aa7c24506) Branch: v2.6 https://github.com/mongodb/mongo/commit/bd585fa7ac8fb51df967116e360f5fc0e8b97596
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: SERVER-19464 Have DSMergeCursors correctly cleanup _cursors in dispose()

          This involves killing the cursor and returning the connection to the pool.
          This commit also ensures that DSSort calls dispose on its source as needed.

          (cherry picked from commit 5c20356061c19b7343cb9aab7398238581f0b600)
          Branch: v2.6
          https://github.com/mongodb/mongo/commit/aace5734271b3563ca883c39c0ea37f2e111f8cb

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: SERVER-19464 Have DSMergeCursors correctly cleanup _cursors in dispose() This involves killing the cursor and returning the connection to the pool. This commit also ensures that DSSort calls dispose on its source as needed. (cherry picked from commit 5c20356061c19b7343cb9aab7398238581f0b600) Branch: v2.6 https://github.com/mongodb/mongo/commit/aace5734271b3563ca883c39c0ea37f2e111f8cb
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: SERVER-19464 Add a way to explicitly kill a DBClientCursor before destruction

          (cherry picked from commit 0476dec3ae310f768ae7fd31418a4c8aa7c24506)

          Conflicts:
          src/mongo/client/dbclientcursor.h
          Branch: v3.0
          https://github.com/mongodb/mongo/commit/ade79fbb0f2e8843177c9ee2c75c2ef7cdf82db6

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: SERVER-19464 Add a way to explicitly kill a DBClientCursor before destruction (cherry picked from commit 0476dec3ae310f768ae7fd31418a4c8aa7c24506) Conflicts: src/mongo/client/dbclientcursor.h Branch: v3.0 https://github.com/mongodb/mongo/commit/ade79fbb0f2e8843177c9ee2c75c2ef7cdf82db6
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: SERVER-19464 Have DSMergeCursors correctly cleanup _cursors in dispose()

          This involves killing the cursor and returning the connection to the pool.
          This commit also ensures that DSSort calls dispose on its source as needed.

          (cherry picked from commit 5c20356061c19b7343cb9aab7398238581f0b600)
          Branch: v3.0
          https://github.com/mongodb/mongo/commit/cefd1536c84d05b71b7d9701bb44ea6d47ee8b3c

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: SERVER-19464 Have DSMergeCursors correctly cleanup _cursors in dispose() This involves killing the cursor and returning the connection to the pool. This commit also ensures that DSSort calls dispose on its source as needed. (cherry picked from commit 5c20356061c19b7343cb9aab7398238581f0b600) Branch: v3.0 https://github.com/mongodb/mongo/commit/cefd1536c84d05b71b7d9701bb44ea6d47ee8b3c

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                  Agile