[SERVER-55816] Investigate negative timeouts in connection pool Created: 06/Apr/21  Updated: 29/Oct/23  Resolved: 14/Jan/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 5.3.0

Type: Bug Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Tyler Seip (Inactive)
Resolution: Fixed Votes: 0
Labels: original-top-20, servicearch-q4-2021, servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Service Arch 2021-07-12, Service Arch 2021-08-09, Service Arch 2021-08-23, Service Arch 2021-10-04, Service Arch 2022-1-10, Service Arch Test, Service Arch 2022-1-24
Participants:
Story Points: 3

 Description   

Connection pools setup event timers to check if the network interface time limit is exceeded. Timeouts are handled by fulfilling the promise for pending requests with ErrorCodes::NetworkInterfaceExceededTimeLimit. Older versions (v4.4 and before) also include the timeout (in milliseconds) in the error description.

The timeout calculations may be susceptible to underflow, where the calculated timeout could be a negative number. This ticket should investigate the possibility of negative timeouts in ConnectionPool::SpecificPool::updateEventTimer() and propose fixes if necessary.

 

Acceptance criteria:

Write unit tests for the above mentioned function. Ensure one of the triggers a negative timeout and fix it. Timebox it to 1 day to write the unit test. 



 Comments   
Comment by Githook User [ 14/Jan/22 ]

Author:

{'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}

Message: SERVER-55816: Clamp negative timeouts in connection pools' connections
Branch: master
https://github.com/mongodb/mongo/commit/4371faec4e537ed676fba1f9e4af944a01a733c7

Comment by Githook User [ 24/Sep/21 ]

Author:

{'name': 'sergey.galtsev', 'email': 'sergey.galtsev@mongodb.com', 'username': 'brushless-glitch'}

Message: Revert "SERVER-55816: Clamp negative timeouts in connection pools' connections"

This reverts commit ed2e91304a83771f20e3df874222984c61a3e884.
Branch: master
https://github.com/mongodb/mongo/commit/224536b8cf969b8dcbe34ea39d8d59c57747fee2

Comment by Githook User [ 21/Sep/21 ]

Author:

{'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}

Message: SERVER-55816: Clamp negative timeouts in connection pools' connections
Branch: master
https://github.com/mongodb/mongo/commit/ed2e91304a83771f20e3df874222984c61a3e884

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