[SERVER-55581] return connection back to the pool in getUnshardedCollInfo Created: 28/Mar/21 Updated: 12/May/22 Resolved: 16/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | 4.0.20 |
| Fix Version/s: | 4.2.15, 4.4.7, 5.0.2, 4.0.27 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | peng zhenyi | Assignee: | Tyler Seip (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | pull-request, servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v5.0, v4.4, v4.2, v4.0
|
||||||||||||||||||||||||
| Sprint: | Service Arch 2021-08-09 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 84 | ||||||||||||||||||||||||
| Story Points: | 2 | ||||||||||||||||||||||||
| Description |
|
In "getUnshardedCollInfo", the newly created ScopedDbConnection is not returned to the globalConnPool. Acceptance criteria: Confirm whether this a bug and if so, make sure the connection doesn't leak. |
| Comments |
| Comment by Githook User [ 12/May/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: This reverts commit 663e90bbe862969572246b7b442845ed83a2472d. (cherry picked from commit 81fa710687e399d7aa2bd093987396c6f6a36956) |
| Comment by Githook User [ 11/May/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: This reverts commit 663e90bbe862969572246b7b442845ed83a2472d. |
| Comment by Tyler Seip (Inactive) [ 16/Aug/21 ] |
|
Marking this ticket as a duplicate of |
| Comment by Tyler Seip (Inactive) [ 16/Aug/21 ] |
|
The 4.2 revert is being tracked by |
| Comment by Githook User [ 12/Aug/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: Revert " This reverts commit e830129078cb6c6d7c90b50ce62ab7f6669b12ec. |
| Comment by Githook User [ 12/Aug/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: Revert " This reverts commit b4e064826b951bd9890c0cf62ae3ccc8a73917c0. |
| Comment by Githook User [ 09/Aug/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: |
| Comment by Githook User [ 09/Aug/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: |
| Comment by Githook User [ 09/Aug/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: (cherry picked from commit 663e90bbe862969572246b7b442845ed83a2472d) |
| Comment by Githook User [ 09/Aug/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: (cherry picked from commit 663e90bbe862969572246b7b442845ed83a2472d) |
| Comment by Tyler Seip (Inactive) [ 09/Aug/21 ] |
|
Yes, I'll be backporting this change this week; you can watch BACKPORT-10186 for more details. I'll try and get to it today! |
| Comment by peng zhenyi [ 09/Aug/21 ] |
|
Hi tyler.seip and ratika.gandhi, Will the branch v4.0 be backported? |
| Comment by Githook User [ 03/Aug/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: |
| Comment by Tyler Seip (Inactive) [ 03/Aug/21 ] |
|
I believe the destructor of ScopedDbConnection will return the connection to the pool automatically; see here (note that this hasn't changed since 2015 so it should be in all active versions of Mongo). I don't see any leaked connections here. pengzhenyi, did you notice this because you observed a leak? Edit: I didn't read that destructor very closely; we can still leak connections. I'll search around for all examples of unclosed connections. Edit 2: After auditing all of the ScopedDbConnections, this is indeed the only one that doesn't call done() on success. Thanks for finding this pengzhenyi! |
| Comment by peng zhenyi [ 30/Jun/21 ] |
|
As https://jira.mongodb.org/browse/SERVER-39642 fixed, the egress counter won't increase to a very large value. But the ScopedDbConnection which can be reused will be destructed. And that may lead to too much connection's creation and destroy. |
| Comment by Ratika Gandhi [ 29/Jun/21 ] |
|
We will investigate this in the next few iterations. |
| Comment by peng zhenyi [ 28/Jun/21 ] |
|
Hi eric.sedor, it this a bug ? or any other progress here? |
| Comment by Eric Sedor [ 29/Mar/21 ] |
|
Thanks pengzhenyi, I'm assigning this ticket to an appropriate team to evaluate. |
| Comment by peng zhenyi [ 28/Mar/21 ] |