[SERVER-3249] support so_timeout on DBClientReplicaSet Created: 13/Jun/11  Updated: 12/Jul/16  Resolved: 08/Aug/11

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: None
Fix Version/s: 1.9.2

Type: Improvement Priority: Major - P3
Reporter: Alexey Guseynov Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File diff    
Backwards Compatibility: Major Change
Participants:

 Description   

Need to add to constructor and hook into: ConnectionString::connect

Also need to do the getTimeout methods, etc...

WAS:

We have run in-to following issue in our software:
We have 3 servers running mongodb in replicaset configuration. One servers runs our application and is loaded by testing software at rate of 50 requests pes second. Then we configure iptables on server running primary monga node to drop all packets from and to other servers. By this we emulate network probems which may occur.
In some small period of time (I think 20 seconds) secondary nodes understand, that link is broken and elect new primary. Server works fine. But not our application. C++ driver uses default network timeout for connection which on our system is 15 minutes. When netwok fails our application still tries to make queries and all available threas hang inside C++ driver waiting for network response. For next 15 minutes our service does not respond because all threads in thread pool are used out.
What we need is to set timeout for about 15 seconds instead of 15 minutes.

Attached patch adds ability to specify timeout to replica set. This patch breaks ABI, but API is backward compatible.



 Comments   
Comment by auto [ 07/Aug/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-3249 add so_timeout support in DBClientReplicaSet
Branch: master
https://github.com/mongodb/mongo/commit/94412807e6ac42dfe21ba62a4f39c2fdc55ed2cd

Comment by Alexey Guseynov [ 12/Jul/11 ]

Any news here?

Comment by Alexey Guseynov [ 13/Jun/11 ]

This is clone of https://jira.mongodb.org/browse/SERVER-3184
That issue was unreasonably closed. I had left comments a week ago where I've described situations in which server may stop responding without generating network errors. But it looks like nobody looks through resolved issues and there is no "reopen button".

Generated at Thu Feb 08 03:02:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.