You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Florian Hockmann (Jira)" <ji...@apache.org> on 2020/04/02 16:00:00 UTC

[jira] [Commented] (TINKERPOP-2328) Do not close all connections if just one has became closed

    [ https://issues.apache.org/jira/browse/TINKERPOP-2328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073851#comment-17073851 ] 

Florian Hockmann commented on TINKERPOP-2328:
---------------------------------------------

The fix for TINKERPOP-2288 will probably also fix this issue as it already moves away from closing all connections just because one is in a closed state.

The issue you mention when {{Dispose}} gets called while the connection pool is in the process of creating new connections is a separate issue, although of course a valid one. We could fix that for example by using a {{CancellationToken}} that we provide to the connection creation tasks and that we cancel in the {{Dispose}} method. The pool population could in the end check whether this task was cancelled and in that case close all connections that it has already created successfully. Do you want to create a ticket for that? If you want to fix that, then a PR would of course also be more than welcome. I would probably just wait until we have fixed TINKERPOP-2288 as that changes a lot in the {{ConnectionPool}}.

> Do not close all connections if just one has became closed
> ----------------------------------------------------------
>
>                 Key: TINKERPOP-2328
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2328
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: dotnet
>    Affects Versions: 3.4.4
>            Reporter: Dzmitry L
>            Priority: Major
>
> Current implementation of "ConnectionPool" closes all available connections if just one has became closed (is not opened) [https://github.com/apache/tinkerpop/blob/0b9eb170c93dd114f012cb63bfbd1c5a240e58f4/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs#L154]
> what leads to "ServerUnavailableException"
> We could leave all remaining connections.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)