xiazcy opened a new pull request #1478: URL: https://github.com/apache/tinkerpop/pull/1478
https://issues.apache.org/jira/browse/TINKERPOP-2569 The issue is that the client's `initialized` field is set to `true` as long as hosts added, even though the hosts may be dead and the connection pools failed to initialize, and `submitAsync()` will only re-init() the client (along with connection pools) if `initialized` is set to false. So even if the server comes back up, the client will not try to reconnect. Original approach is to confirm host availability and throw exceptions during client `init()` when hosts are dead, so that the client's `initialization` is not set to true, however, this would fail tests that rely on the "lazy connection" concept (i.e. hosts would need to be available at the time driver connects). To avoid that, this is a simpler fix that adds a boolean flag `noLiveHostAvailable` to indicate when there is no live host at client initialization, so we can re-init() the client in the case it is `true` (in addition to checking the client `initialized` flag). This `noLiveHostAvailable` flag is set to `true` initially and is changed to `false` when any host initiates a connection pool successfully. Builds successfully with `mvn clean install && mvn verify -pl gremlin-server,gremlin-console -DskipIntegrationTests=false`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
