GitHub user FlorianHockmann opened a pull request:
https://github.com/apache/tinkerpop/pull/903
Gremlin.Net: Add ConnectionPool min and max sizes TINKERPOP-1774
https://issues.apache.org/jira/browse/TINKERPOP-1774
The Gremlin.Net `ConnectionPool` now has min and max sizes. The pool will
be initialized with the configured minimum number of connections on creation.
It will also no longer create an unlimited number of connections. Instead, a
`TimeoutException` will be thrown when the max limit is reached and no
connection became available within a configurable time.
The implementation is very similar to that of the `ConnectionPool` in the
Java driver. This also means that it doesn't contain a lock any more which was
already suggested in the ticket by @jorgebay.
I also optimized a bit of async code in the driver by removing `await`s
that weren't necessary because they were immediately returned. In those cases,
the `Task` can also be just returned without being awaited which avoids the
need for the compiler to generate a state machine just for the `await`.
Tests passed with `./docker/build.sh -t -i` a few days ago but I made some
minor changes afterwards and also rebased on `master` and now I can't build any
more due to the current problem with gremlin-python mentioned by @spmallette on
the mailing list.
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1774
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/903.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 #903
----
commit e35ef0af1a74e093054776a423f825fa11fa8a36
Author: Florian Hockmann <fh@...>
Date: 2018-07-30T19:45:26Z
Add ConnectionPool min and max sizes TINKERPOP-1774
The Gremlin.Net ConnectionPool now has min and max sizes. The pool will
be initialized with the configured minimum number of connections on
creation. It will also no longer create an unlimited number of
connections. Instead, a TimeoutException will be thrown when the max
limit is reached and no connection became available within a
configurable time.
----
---