You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/10/25 17:50:06 UTC

[GitHub] [gobblin] phet commented on a change in pull request #3418: [GOBBLIN-1567] do not set a custom maxConnLifetime for sql connection

phet commented on a change in pull request #3418:
URL: https://github.com/apache/gobblin/pull/3418#discussion_r735828590



##########
File path: gobblin-service/src/main/java/org/apache/gobblin/service/modules/db/ServiceDatabaseProviderImpl.java
##########
@@ -70,7 +70,6 @@ private synchronized void ensureDataSource() {
     // To improve performance, we only check connections on creation, and set a maximum connection lifetime
     // If database goes to read-only mode, then connection would not work correctly for up to configured lifetime
     dataSource.setTestOnCreate(true);
-    dataSource.setMaxConnLifetimeMillis(configuration.getMaxConnectionLifetime().toMillis());

Review comment:
       your PR description mentions that -1 means no max lifetime.  would it be desirable here to still invoke `setMaxConnLifetimeMillis`, but to have config pass in -1 (so it's effectively disabled)?  that way, with no code change required, only config change, we could still in the future set a lifetime max value.  could that be potentially helpful, or are you certain that we'd never wish to constrain by any max lifetime value?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org