[
https://issues.apache.org/jira/browse/TINKERPOP-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16151537#comment-16151537
]
ASF GitHub Bot commented on TINKERPOP-1766:
-------------------------------------------
GitHub user FlorianHockmann opened a pull request:
https://github.com/apache/tinkerpop/pull/704
TINKERPOP-1766 Gremlin.Net: Add handling for closed connections
https://issues.apache.org/jira/browse/TINKERPOP-1766
This avoids `Connections` from being added back to the `ConnectionPool`
when they were closed which happens when the server gets unavailable. In that
case all existing `Connections` are removed from the `ConnectionPool` and
closed as they are most likely also not `Open` anymore. This is in line with
the handling for closed connections in `gremlin-driver`.
Unfortunately, I don't know of a good way to test something like this. We
probably would have to make internal classes like `Connection` public which
isn't that nice as users shouldn't see them in my opinion.
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1766
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/704.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 #704
----
commit 98e4e1b8201f50e1f34458a82c20f2737aa6ae53
Author: florianhockmann <[email protected]>
Date: 2017-09-02T15:54:39Z
Add handling for closed connections
Closed connections are not returned to the ConnectionPool as the client
cannot send any further requests with them. Additionally, the host is
considered to be unavailable when a connection was closed and all other
connections are closed and removed from the ConnectionPool. This is in line
with the handling for closed connection in gremlin-driver.
commit d9a4f79f7c568761461dc11d22fbf907578f7d14
Author: florianhockmann <[email protected]>
Date: 2017-09-02T16:00:52Z
Update NuGet packages of test projects
One of the dependencies (Castle.Core) produced a warning because one of its
dependencies couldn't be found in the specified version. This doesn't occur
anymore for the updated version.
----
> Gremlin.Net: Closed connections should not be re-used
> ------------------------------------------------------
>
> Key: TINKERPOP-1766
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1766
> Project: TinkerPop
> Issue Type: Bug
> Components: language-variant
> Affects Versions: 3.3.0, 3.2.6
> Reporter: Florian Hockmann
>
> The driver of Gremlin.Net is kept very simle which holds especially true for
> the {{ConnectionPool}}. It simply returns every connection to its pool of
> usable connections that was {{disposed}} by the client. Unfortunately, this
> also applies in case the submit failed due to an already closed connection
> which means that the client will get the closed connection back from the
> {{ConnectionPool}} later and continues trying to submit messages over this
> closed connection.
> This can be fixed by checking whether the {{Connection}} is still open before
> adding it back to the {{ConnectionPool}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)