[SERVER-59400] Fix the regression introduced by SERVER-55581 Created: 16/Aug/21  Updated: 29/Oct/23  Resolved: 12/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc6, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tyler Seip (Inactive) Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 1
Labels: servicearch-q1-2022
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-55581 return connection back to the pool in... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.3, v5.0, v4.4
Sprint: Service Arch 2022-05-16
Participants:
Linked BF Score: 49
Story Points: 5

 Description   

SERVER-55581 made a change which returns a ScopedDbConnection created in getUnshardedCollInfo back to the connection pool when we are done with it. By returning this connection to the pool, we also implicitly reuse it the next time we try and establish a connection to the same host. In version 4.2, this causes a unit test to fail somewhat consistently (see BF-22220). After investigating this a short while, I believe that the issue is that the returned connection dies (for unknown reasons) and upon reuse, the logic we use to check the connection status returns a cached result, whereupon we try to reuse a broken connection and fail. In this ticket, investigate exactly what is going on, determine the best way to fix it, and do so.

Note that the changes in SERVER-55581 were reverted in both the 4.0 and 4.2 branches (but not 4.4, 5.0, or master) so any changes introduced here should also reintroduce the single-line change of SERVER-55581 (or equivalent) to 4.2 and 4.0.

This is a time-boxed 5-point tickets. Reassess with team after time-box to determine next steps.



 Comments   
Comment by Githook User [ 12/May/22 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-59400 Revert "SERVER-55581: Return ScopedDbConnection to connection pool in cluster aggregation planner"

This reverts commit 663e90bbe862969572246b7b442845ed83a2472d.

(cherry picked from commit 81fa710687e399d7aa2bd093987396c6f6a36956)
Branch: v6.0
https://github.com/mongodb/mongo/commit/e1d4cd0bffd26fbbd3d0c0f58eea0ff4b4982238

Comment by Githook User [ 11/May/22 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-59400 Revert "SERVER-55581: Return ScopedDbConnection to connection pool in cluster aggregation planner"

This reverts commit 663e90bbe862969572246b7b442845ed83a2472d.
Branch: master
https://github.com/mongodb/mongo/commit/81fa710687e399d7aa2bd093987396c6f6a36956

Comment by Amirsaman Memaripour [ 10/May/22 ]

In favor of deprecating and removing the legacy connection pools, ServiceArch decided to revert changes introduced by SERVER-55581 on v4.4+ version (i.e., master, v6.0, v5.3, v5.0, and v4.4).

Generated at Thu Feb 08 05:47:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.