[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: |
| Comment by Githook User [ 07/Nov/18 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |
| Comment by Githook User [ 06/Nov/18 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |
| Comment by Githook User [ 05/Nov/18 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |
| 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. |