Skip to content

Add Oracle connection pool#3770

Merged
losipiuk merged 3 commits intotrinodb:masterfrom
eskabetxe:oracleConnectionPoll
Jul 7, 2020
Merged

Add Oracle connection pool#3770
losipiuk merged 3 commits intotrinodb:masterfrom
eskabetxe:oracleConnectionPoll

Conversation

@eskabetxe
Copy link
Member

as asked here: #1959 (comment)

this is to allow to configure a oracle connection pool

@cla-bot cla-bot bot added the cla-signed label May 18, 2020
@eskabetxe eskabetxe requested a review from ebyhr May 18, 2020 10:31
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have an interface for ConnectionProvider and have implementation for for both pooledDataSource and a driver based one and bind them in the run time ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @Praveen2112, I change this factory to be only a pool factory..
for driver based I leave the DriverConnectorFactory that is already used..
this was a old code from previous PR.

if you could check this changes.

@tooptoop4
Copy link
Contributor

@eskabetxe can u change

private final int fetchSize = 1000;
to 10000 or at least 5000?

@eskabetxe
Copy link
Member Author

@tooptoop4 I create a PR with your request

@ebyhr ebyhr changed the title Add Oracle connection poll Add Oracle connection pool May 19, 2020
@eskabetxe eskabetxe self-assigned this May 19, 2020
Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few cleanup comments mostly looks good.

Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more nits. Thanks.
@Praveen2112, @ebyhr are you good with this one already?

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you squash the last three commits?

@eskabetxe
Copy link
Member Author

@losipiuk could this be merged?

Copy link
Member

@Praveen2112 Praveen2112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delayed response. Looks good to me . But can we move the integration test changes as a separate commit

@eskabetxe
Copy link
Member Author

@Praveen2112 done

@losipiuk
Copy link
Member

Checkstyle failed.
I think what @Praveen2112 asked for was to separate integration tests refactoring (extracting base class) from adding tests for connection pooling. It would be a bit nicer for review. Though given fact review is done already I will not push for that.

@eskabetxe
Copy link
Member Author

@losipiuk fixed
@Praveen2112 I generate a commit with the extraction of base class..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is being added in Extract a variable with Oracle JDBC version commit. Does not look intentional.

(Not sure why would you want to separate this btw, but maybe this was agreed upon)

Copy link
Member Author

@eskabetxe eskabetxe Jun 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was asked here #3770 (comment)
I let the new dependency because extracting only the version will lead to a "why extract the version if only used in one dependency"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that at the time i suggested extracting the commit there was just one use of dep.oracle.version. But maybe I missed the other one.

Anyway.

  • Either leave commit which extract variable and only use it for ojdbc8 entry. And then add ucp in followup commit together with pooling implementation.
  • Or squash two commits together.

I am slightly toward former one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Oracle IntegrationTest cleanups should not be a separate commit
(we should not add TestOraclePoolIntegrationSmokeTest being a copy of TestOracleIntegrationSmokeTest` and only then extract common super class)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I squash the 3 commits?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be either:

2 commits:

  • rafactor tests extractin BaseOracleIntegrationSmokeTest (still with 1 concrete subclass TestOracleIntegrationSmokeTest)
  • implement pooling and add TestOraclePoolIntegrationSmokeTest

Or just 1 commit which refactors tests, add pooling implementation and TestOraclePoolIntegrationSmokeTest alltogether.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the OracleQueryRunner changes can be treated as a separate commit while other the tests can be a part of Add Oracle connection pool

@findepi
Copy link
Member

findepi commented Jun 15, 2020

(just skimming)

@losipiuk
Copy link
Member

losipiuk commented Jul 3, 2020

@eskabetxe there are two minor comments still.

Are you planning to address those? It would be nice to merge this one eventually :)

@eskabetxe
Copy link
Member Author

@losipiuk sorry for the delay..
its done...

@losipiuk
Copy link
Member

losipiuk commented Jul 7, 2020

Thanks. Looks good modulo checkstyle violation:

2020-07-06T19:18:59.5653900Z [INFO] There is 1 error reported by Checkstyle 8.32 with checkstyle/airbase-checks.xml ruleset.
2020-07-06T19:18:59.5678894Z [ERROR] src/test/java/io/prestosql/plugin/oracle/OracleQueryRunner.java:[16,8] (imports) UnusedImports: Unused import - com.google.common.collect.ImmutableList.

@eskabetxe
Copy link
Member Author

@losipiuk fixed

@losipiuk losipiuk merged commit 7a15b76 into trinodb:master Jul 7, 2020
@losipiuk
Copy link
Member

losipiuk commented Jul 7, 2020

Merged, thanks!

@losipiuk losipiuk mentioned this pull request Jul 7, 2020
8 tasks
@eskabetxe eskabetxe deleted the oracleConnectionPoll branch July 7, 2020 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

6 participants