[SERVER-19464] $sort stage in aggregation doesn't call scoped connections done () Created: 16/Jul/15  Updated: 05/Jan/18  Resolved: 24/Jul/15

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Sharding
Affects Version/s: 2.6.10
Fix Version/s: 2.6.11, 3.0.6, 3.1.7

Type: Bug Priority: Critical - P2
Reporter: Charlie Page Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-19553 Mongod shouldn't use sayPiggyBack to ... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

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
Participants:
Case:

 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.



 Comments   
Comment by Githook User [ 07/Aug/15 ]

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

Comment by Githook User [ 07/Aug/15 ]

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

Comment by Githook User [ 29/Jul/15 ]

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

Comment by Githook User [ 29/Jul/15 ]

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

Comment by Githook User [ 28/Jul/15 ]

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

Comment by Githook User [ 28/Jul/15 ]

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

Comment by Githook User [ 24/Jul/15 ]

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

Comment by Githook User [ 24/Jul/15 ]

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

Generated at Thu Feb 08 03:51:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.