[JAVA-1984] DBPort's closed flag is not reset on connection retry causing "java.lang.IllegalStateException: open" Created: 30/Sep/15 Updated: 07/Dec/15 Resolved: 03/Nov/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 2.13.3 |
| Fix Version/s: | 2.14.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dmitry Panov [X] | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Hello, I've seen a following stack trace:
I could not reproduce it, however I found a potential problem in DBPort.java:
If the first run of the loop results in an IOException, the DBPort is closed which sets the closed flag to true. However, If a subsequent run succeeds the flag is never reset which can cause the above stacktrace. Is it a bug or am I missing something? |
| Comments |
| Comment by Githook User [ 03/Nov/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Jeffrey Yemin [ 01/Oct/15 ] |
|
OK, thanks for the information. We'll try to get a fix for it in the next patch release. |
| Comment by Dmitry Panov [X] [ 30/Sep/15 ] |
|
autoConnectRetry is set to true. As for the logs, no, unfortunately the log level was not sufficient to record warnings. |
| Comment by Jeffrey Yemin [ 30/Sep/15 ] |
|
One other question: in your MongoClientOptions, have you set the autoConnectRetry property to true? |
| Comment by Jeffrey Yemin [ 30/Sep/15 ] |
|
Yes, it definitely looks like a bug. Did you happen to catch in your logs the WARNING generated in that catch clause? |