exasol / spark-connector

A connector for Apache Spark to access Exasol
Apache License 2.0
12 stars 7 forks source link

ExasolConnectionManager could be created several times #196

Closed Shmuma closed 1 year ago

Shmuma commented 1 year ago

We have several createRelation methods in DefaultSource and every variant of those methods create ExasolConnectionManager instance, which supposed to be a singleton (caching jdbc connections). But we call those methods from each other (example: https://github.com/exasol/spark-connector/blob/main/exasol-jdbc/src/main/scala/com/exasol/spark/DefaultSource.scala#L138), so, it is possible to get several ConnectionManager instances.

Shmuma commented 1 year ago

After closer look in the code logic, it turned out not a problem, as ConnectionManager just creates new connections without pooling them.