[JAVA-648] The driver does not start if the replica set is not available Created: 19/Sep/12 Updated: 21/Sep/12 Resolved: 20/Sep/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 2.9.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lukas Krecan | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We want our application to start even though no replica-set seed is accessible.
The Mongo constructor never finishes. Would it be possible to change the behavior? Or is it a feature? |
| Comments |
| Comment by Lukas Krecan [ 21/Sep/12 ] | |||||||||
|
Created | |||||||||
| Comment by Jeffrey Yemin [ 20/Sep/12 ] | |||||||||
|
Confirmed that connectTimeout is being ignored in this case. Thanks for finding this, and please do open a new bug for it. | |||||||||
| Comment by Lukas Krecan [ 20/Sep/12 ] | |||||||||
|
Sorry, our first investigation was wrong. Our situation was like this:
Connection timeout is ignored in this case. Default 20s timeout is applied in the constructor of ConnectionStatus. I guess it's a bug but a different one. Feel free to close this issue and I can file a new one about the connection timeout if you confirm that it's indeed a bug. | |||||||||
| Comment by Jeffrey Yemin [ 19/Sep/12 ] | |||||||||
|
I can't reproduce what you're seeing. If I run the following code with the replica set entirely down, the program completes:
You will see those error messages, but they are generated in a separate thread, and are not preventing the Mongo constructor from completing. |