[JAVA-398] Configure max connection retry time Created: 20/Jul/11 Updated: 10/Aug/11 Resolved: 04/Aug/11 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 2.6.3 |
| Fix Version/s: | 2.6.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Sean Schulte | Assignee: | Antoine Girbal |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
If the Mongo server is down, the socket timeout is not applicable (it realizes it's down close to instantly). But DBPort has a constant called CONN_RETRY_TIME_MS that means DBPort will repeatedly try to connect to the unavailable server until a certain time has elapsed. That maximum connection retry time should be configurable. The code to make it configurable is here: https://github.com/mongodb/mongo-java-driver/pull/37 |
| Comments |
| Comment by Antoine Girbal [ 04/Aug/11 ] |
|
option is called maxAutoConnectRetryTime |
| Comment by auto [ 04/Aug/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Sean Schulte [ 22/Jul/11 ] |
|
Well, DBPort already has an exponential retry. It starts at 100ms and doubles until the total amount of time spent is longer than CONN_RETRY_TIME_MS (15000ms). This patch just adds the ability to configure that total amount of time spent. |
| Comment by Scott Hernandez (Inactive) [ 22/Jul/11 ] |
|
It might be good to have non-linear retry (exponential back-off) rate for this. |