[SERVER-55311] In v4.0 branch, DBClientConnection::_checkConnection() can throw but still mark the connection successful Created: 18/Mar/21  Updated: 29/Oct/23  Resolved: 26/Apr/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.0.23
Fix Version/s: 4.0 Required

Type: Bug Priority: Major - P3
Reporter: Andrew Shuvalov (Inactive) Assignee: Backlog - Service Architecture
Resolution: Fixed Votes: 2
Labels: servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

The code here can re-throw the exception if it's not AuthenticationFailed but still keeps the `_failed` flag as false. Call `_markFailed(kSetFlag)` before throwing.

Investigate if this problem occurs in later branches too. 



 Comments   
Comment by Githook User [ 26/Apr/21 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-55311: DBClientConnection::_checkConnection() can throw but still mark the connection successful
Branch: v4.0
https://github.com/mongodb/mongo/commit/63026dcec31e315648cefb79630308868d983203

Comment by Githook User [ 26/Apr/21 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-55311: DBClientConnection::_checkConnection() should mark connection as failed on exception
Branch: v4.0
https://github.com/mongodb/mongo/commit/6468c67110d862b4125b4b12f94cec0bac9183be

Comment by Githook User [ 26/Apr/21 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-55311: DBClientConnection::_checkConnection() should mark connection as failed on exception
Branch: v4.0
https://github.com/mongodb/mongo/commit/b5e29b32b7988309145282ed78951bd386b15ed8

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