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

ASF GitHub Bot commented on NIFI-5588:
--------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/3022


> Unable to set indefinite max wait time on DBCPConnectionPool
> ------------------------------------------------------------
>
>                 Key: NIFI-5588
>                 URL: https://issues.apache.org/jira/browse/NIFI-5588
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.7.1
>         Environment: macOS, Java 8
>            Reporter: Colin Dean
>            Assignee: Pierre Villard
>            Priority: Major
>
> The DBCPConnectionPool controller service accepts a "Max Wait Time" that 
> configures 
> bq. The maximum amount of time that the pool will wait (when there are no 
> available connections) for a connection to be returned before failing, or -1 
> to wait indefinitely. 
> This value must validate as a time period. *There is no valid way to set 
> {{-1}}* with the current validator.
> The validator [in 
> use|https://github.com/apache/nifi/blob/0274bd4ff3f4199838ff1307c9c01d98fcc9150b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java#L110]
>  is {{StandardValidators.TIME_PERIOD_VALIDATOR}}. The 
> [TIME_PERIOD_VALIDATOR|https://github.com/apache/nifi/blob/0274bd4ff3f4199838ff1307c9c01d98fcc9150b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/processor/util/StandardValidators.java#L443]
>  uses [a regex built  in 
> FormatUtils|https://github.com/apache/nifi/blob/0274bd4ff3f4199838ff1307c9c01d98fcc9150b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/FormatUtils.java#L44]
>  that must have a time unit:
> {code:java}
> public static final String TIME_DURATION_REGEX = "(\\d+)\\s*(" + 
> VALID_TIME_UNITS + ")";
> {code}
> The regex does not allow for an value such as {{-1}} or {{-1 secs}}, etc.
> The obvious workaround is to set that _very_ high.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to