gobblin icon indicating copy to clipboard operation
gobblin copied to clipboard

[GOBBLIN-50] Every time createJdbcSource() is called, new JdbcProvider is assigned to this.jdbcSource.

Open sungpeo opened this issue 8 years ago • 2 comments

Every time createJdbcSource() is called, new JdbcProvider is assigned to 'this.jdbcSource'. It means that it lose exist jdbcSource. Therefore, even though closeConnection() is called, lost connections from this.jdbcSource remains connected. So, I moved createJdbcSource(), this.jdbcSource.getConnection() to construct of JdbcExtractor.

I'm using a gobblin-core as a module of web application not a batch. The more JdbcSource is executed, the more connections will cause problems. (The number of connections become a maximum number of allowed connections soon.)

sungpeo avatar Feb 23 '17 17:02 sungpeo

@sungpeo : There seem to be test failures. Can you figure out why they are failing?

./gradlew :gobblin-core:test

-- snippet from Travis build: https://travis-ci.org/linkedin/gobblin/jobs/204660255

Gradle suite > Gradle test > gobblin.source.extractor.watermark.TimestampWatermarkTest.testGetWatermarkConditionMySql STARTED Gradle suite > Gradle test > gobblin.source.extractor.watermark.TimestampWatermarkTest.testGetWatermarkConditionMySql FAILED java.lang.NullPointerException at TimestampWatermarkTest.java:61 Gradle suite > Gradle test > gobblin.source.extractor.watermark.TimestampWatermarkTest.testGetWatermarkConditionSqlServer STARTED Gradle suite > Gradle test > gobblin.source.extractor.watermark.TimestampWatermarkTest.testGetWatermarkConditionSqlServer FAILED java.lang.NullPointerException at TimestampWatermarkTest.java:68

shirshanka avatar Feb 24 '17 18:02 shirshanka

https://issues.apache.org/jira/browse/GOBBLIN-50

Please update your PR title with following prefix: [GOBBLIN-50]

abti avatar Jul 27 '17 18:07 abti