[
https://issues.apache.org/jira/browse/TINKERPOP-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555775#comment-17555775
]
ASF GitHub Bot commented on TINKERPOP-2617:
-------------------------------------------
codecov-commenter commented on PR #1709:
URL: https://github.com/apache/tinkerpop/pull/1709#issuecomment-1159270860
#
[Codecov](https://codecov.io/gh/apache/tinkerpop/pull/1709?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
Report
> Merging
[#1709](https://codecov.io/gh/apache/tinkerpop/pull/1709?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(6698fe8) into
[3.5-dev](https://codecov.io/gh/apache/tinkerpop/commit/3d106e8e65568133197dadcf2dd1c1736416d44a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(3d106e8) will **not change** coverage.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## 3.5-dev #1709 +/- ##
========================================
Coverage 63.27% 63.27%
========================================
Files 23 23
Lines 3553 3553
========================================
Hits 2248 2248
Misses 1131 1131
Partials 174 174
```
------
[Continue to review full report at
Codecov](https://codecov.io/gh/apache/tinkerpop/pull/1709?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by
[Codecov](https://codecov.io/gh/apache/tinkerpop/pull/1709?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
Last update
[3d106e8...6698fe8](https://codecov.io/gh/apache/tinkerpop/pull/1709?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
Read the [comment
docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> Refactor Java Driver to have one method for connection selection
> ----------------------------------------------------------------
>
> Key: TINKERPOP-2617
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2617
> Project: TinkerPop
> Issue Type: Improvement
> Components: driver
> Affects Versions: 3.4.12
> Reporter: Stephen Mallette
> Priority: Minor
>
> To make a decision on whether a connection should be borrowed or not, a Java
> client today does two logic which are different from each other. They should
> both be same. One bit of logic to do so is at:
> {code}
> if (borrowed >= maxSimultaneousUsagePerConnection &&
> leastUsedConn.availableInProcess() == 0) {
> {code}
> and another is:
> {code}
> final int inFlight = leastUsed.borrowed.get();
> final int availableInProcess =
> leastUsed.availableInProcess();
> if (inFlight >= availableInProcess) {
> logger.debug("Least used {} on {} has requests
> borrowed [{}] >= availableInProcess [{}] - may timeout waiting for
> connection",
> leastUsed, host, inFlight,
> availableInProcess);
> break;
> }
> if (leastUsed.borrowed.compareAndSet(inFlight, inFlight +
> 1)) {
> if (logger.isDebugEnabled())
> logger.debug("Return least used {} on {} after
> waiting", leastUsed.getConnectionInfo(), host);
> return leastUsed;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)