[CSHARP-1888] ServerMonitor should use HeartbeatTimeout for socket read/write timeouts Created: 08/Jan/17  Updated: 08/Nov/18  Resolved: 05/Nov/18

Status: Closed
Project: C# Driver
Component/s: Connectivity
Affects Version/s: None
Fix Version/s: 2.7.1

Type: Bug Priority: Major - P3
Reporter: Aristarkh Zagorodnikov Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Currently it seems that ServerSettings' HeartbeatTimeout is not used since ServerMonitor (HeartbeatAsync) uses IConnection.OpenAsync that uses MongoClientSettings.ConnectionTimeout. I wonder if this is an oversight or a future improvement area?



 Comments   
Comment by Githook User [ 07/Nov/18 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-1888: Fix test that was dependent on a different ticket that was not backported.
Branch: v2.7.x
https://github.com/mongodb/mongo-csharp-driver/commit/872087af873a3d2cf40661f5fb9a8dbeff755e0f

Comment by Githook User [ 07/Nov/18 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-1888: Back out part of a change that got inadvertently backported during cherry picking.
Branch: v2.7.x
https://github.com/mongodb/mongo-csharp-driver/commit/837ca586da9a874850ae641b3fe3bc1253e6b14d

Comment by Githook User [ 06/Nov/18 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-1888: ServerMonitor should use HeartbeatTimeout for socket read/write timeouts.
Branch: v2.7.x
https://github.com/mongodb/mongo-csharp-driver/commit/b1560c5ea2af634847720bd9e372dc3c60b0e12b

Comment by Githook User [ 05/Nov/18 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-1888: ServerMonitor should use HeartbeatTimeout for socket read/write timeouts.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/e156d3fcd1f671da996ceee9b9ea74dd660966d5

Comment by Aristarkh Zagorodnikov [ 11/Jan/17 ]

I believe that MongoClientSettings.ConnectionTimeout is used instead.

Comment by Robert Stam [ 11/Jan/17 ]

The idea is that there are two separate timeouts, one for establishing the connection and another for the heartbeat.

However, as you pointed out ServerMonitor is not currently using the timeout when calling isMaster, so that needs to be addressed.

I don't think it means there is NO timeout, because there is also the ReadTimeout in TcpStreamSettings.

Generated at Wed Feb 07 21:40:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.