Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Resolved
-
None
-
None
-
ghx-label-11
Description
IMPALA-12910 adds a new class DataSourceObjectCache to save DBCP DataSource objects. DBCP DataSource objects hold JDBC driver. By sharing DBCP DataSource objects across multiple JDBC requests, we can avoid to load JDBC driver. Current code checks reference count for each DBCP DataSource object, and removes the cached object once reference count reaches 0.
DBCP DataSource objects should be kept in cache even reference count reaches 0. We could add a query option to enable it. This need a working thread to periodically clean up objects which are idle for long time. Maybe separate maps to save active objects and idle objects. Query options could be passed to JDBC code in TOpenParams.