Skip to content

Commit

Permalink
fix(jdbc-driver): Log errors from connection pool factory
Browse files Browse the repository at this point in the history
generic-pool will just silently throw those away, so we should at least log them
  • Loading branch information
mcheshkov committed Nov 3, 2024
1 parent 3553bdb commit 5cc7131
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/cubejs-jdbc-driver/src/JDBCDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ export class JDBCDriver extends BaseDriver {
acquireTimeoutMillis: 120000,
...(poolOptions || {})
}) as ExtendedPool;

// https://github.com/coopernurse/node-pool/blob/ee5db9ddb54ce3a142fde3500116b393d4f2f755/README.md#L220-L226
this.pool.on('factoryCreateError', (err) => {
this.databasePoolError(err);
});
this.pool.on('factoryDestroyError', (err) => {
this.databasePoolError(err);
});
}

protected async getCustomClassPath() {
Expand Down

0 comments on commit 5cc7131

Please sign in to comment.