[ https://issues.apache.org/jira/browse/TINKERPOP-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15157698#comment-15157698 ]
ASF GitHub Bot commented on TINKERPOP-1172: ------------------------------------------- GitHub user spmallette opened a pull request: https://github.com/apache/incubator-tinkerpop/pull/235 TINKERPOP-1172 Fixed bug with driver connecting to an initially dead server. https://issues.apache.org/jira/browse/TINKERPOP-1172 The `ConnectionPool` wasn't getting initialized properly when the host was dead which then lead to a null pointer exception when trying to reconnect. Also fixed the possibility of a connection leak if the pool was partially initialized but the host died in the middle of that. Those partial connections were never properly closed. I performed multiple successful runs of `mvn clean install && mvn verify -pl gremlin-server -DskipIntegrationTests=false`. VOTE +1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-1172 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-tinkerpop/pull/235.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #235 ---- commit 37f30339cba07d084ed66a33f6f6e05936d18b2a Author: Stephen Mallette <sp...@genoprime.com> Date: 2016-02-22T21:01:44Z Fixed bug with driver connecting to an initially dead server. The ConnectionPool wasn't getting initialized properly when the host was dead which then lead to a null pointer exception when trying to reconnect. Also fixed the possibiilty of a connection leak if the pool was partially initialized but the host died in the middle of that. Those partial connections were never properly closed. ---- > Reconnect to Gremlin Server previously marked as dead > ----------------------------------------------------- > > Key: TINKERPOP-1172 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1172 > Project: TinkerPop > Issue Type: Bug > Components: driver > Affects Versions: 3.1.1-incubating > Reporter: stephen mallette > Assignee: stephen mallette > Fix For: 3.1.2-incubating > > > We have a test to validate that this works when connecting to multiple > servers in a round-robin fashion but nothing that tests against a single > server and it seems that there are some problems around that particular > situation. It tends to manifest as: > {code} > Caused by: java.lang.NullPointerException: null > at > org.apache.tinkerpop.gremlin.driver.ConnectionPool.considerUnavailable(ConnectionPool.java:392) > ~[gremlin-driver-3.1.2-SNAPSHOT.jar:3.1.2-SNAPSHOT] > at > org.apache.tinkerpop.gremlin.driver.ConnectionPool.<init>(ConnectionPool.java:101) > ~[gremlin-driver-3.1.2-SNAPSHOT.jar:3.1.2-SNAPSHOT] > at > org.apache.tinkerpop.gremlin.driver.Client$SessionedClient.initializeImplementation(Client.java:558) > ~[gremlin-driver-3.1.2-SNAPSHOT.jar:3.1.2-SNAPSHOT] > at org.apache.tinkerpop.gremlin.driver.Client.init(Client.java:117) > ~[gremlin-driver-3.1.2-SNAPSHOT.jar:3.1.2-SNAPSHOT] > at > org.apache.tinkerpop.gremlin.driver.Client.submitAsync(Client.java:182) > ~[gremlin-driver-3.1.2-SNAPSHOT.jar:3.1.2-SNAPSHOT] > at > org.apache.tinkerpop.gremlin.driver.Client.submitAsync(Client.java:174) > ~[gremlin-driver-3.1.2-SNAPSHOT.jar:3.1.2-SNAPSHOT] > at org.apache.tinkerpop.gremlin.driver.Client.submit(Client.java:144) > ~[gremlin-driver-3.1.2-SNAPSHOT.jar:3.1.2-SNAPSHOT] > ... 21 common frames omitted > {code} > when the {{ConnectionPool}} can not be intialized in any way at start up. If > that happens the {{Client}} doesn't seem to recover well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)