[
https://issues.apache.org/jira/browse/NIFI-5790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16681681#comment-16681681
]
ASF GitHub Bot commented on NIFI-5790:
--------------------------------------
Github user patricker commented on a diff in the pull request:
https://github.com/apache/nifi/pull/3133#discussion_r232317090
--- Diff:
nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java
---
@@ -59,6 +61,31 @@
+ "Note that no flow file input (attributes, e.g.) is
available for use in Expression Language constructs for these properties.")
public class DBCPConnectionPool extends AbstractControllerService
implements DBCPService {
+ /**
+ * Copied from {@link GenericObjectPoolConfig.DEFAULT_MIN_IDLE} in
Commons-DBCP 2.5.0
+ */
+ private static final String DEFAULT_MIN_IDLE = "0";
+ /**
+ * Copied from {@link GenericObjectPoolConfig.DEFAULT_MAX_IDLE} in
Commons-DBCP 2.5.0
+ */
+ private static final String DEFAULT_MAX_IDLE = "8";
+ /**
+ * Copied from private variable {@link
BasicDataSource.maxConnLifetimeMillis} in Commons-DBCP 2.5.0
+ */
+ private static final String DEFAULT_MAX_CONN_LIFETIME = "-1";
+ /**
+ * Copied from {@link
GenericObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS} in
Commons-DBCP 2.5.0
+ */
+ private static final String DEFAULT_EVICTION_RUN_PERIOD =
String.valueOf(-1L);
+ /**
+ * Copied from {@link
GenericObjectPoolConfig.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS} in Commons-DBCP
2.5.0
+ */
+ private static final String DEFAULT_MIN_EVICTABLE_IDLE_TIME =
String.valueOf(1800000L) + " millis";
--- End diff --
Testing on my local instance is looking good so far. One request, can you
change this to `30 min`? A bit easier to read as a default value that way :)
> DBCPConnectionPool configuration should expose underlying connection idle and
> eviction configuration
> ----------------------------------------------------------------------------------------------------
>
> Key: NIFI-5790
> URL: https://issues.apache.org/jira/browse/NIFI-5790
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: 1.8.0
> Reporter: Colin Dean
> Priority: Major
> Labels: DBCP, database
>
> While investigating a fix for NIFI-5789, I noticed in the [DBCPConnectionPool
> documentation|https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-dbcp-service-nar/1.8.0/org.apache.nifi.dbcp.DBCPConnectionPool/index.html]
> that NiFi appears _not_ to have controller service configuration options
> associated with [Apache
> Commons-DBCP|https://commons.apache.org/proper/commons-dbcp/configuration.html]
> {{BasicDataSource}} parameters like {{minIdle}} and {{maxIdle}}, which I
> think should be both set to 0 in my particular use case.
> Alternatively, I think I could set {{maxConnLifetimeMillis}} to something
> even in the minutes range and satisfy my use case (a connection need not be
> released _immediately_ but within a reasonable period of time), but this
> option is also not available.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)