[
https://issues.apache.org/jira/browse/NIFI-5588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16626871#comment-16626871
]
ASF subversion and git services commented on NIFI-5588:
-------------------------------------------------------
Commit c4d3b5e94f80b3973e18a49007a5e51728c62d74 in nifi's branch
refs/heads/master from [~pvillard]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=c4d3b5e ]
NIFI-5588 - Fix max wait time in DBCP Connection Pool
This closes #3022
Signed-off-by: zenfenan <[email protected]>
> 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)