-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Improved connection pool for HANAService #349
Conversation
hana/lib/drivers/hana-client.js
Outdated
creds.pooling = true | ||
Object.assign(creds, { | ||
// Enables the @sap/hana-client native connection pool implementation | ||
pooling: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creds.pooling is set to true twice, reason?
hana/lib/HANAService.js
Outdated
const driver = drivers[this.options.driver || this.options.credentials.driver]?.driver || drivers.default.driver | ||
const dbc = new driver(this.options.credentials) | ||
options: driver.pool // Ignore generic-pool when native pool is available | ||
? { min: 0, max: 1000 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the default values we've dicussed → documented in our internal bli
hana/lib/HANAService.js
Outdated
}, | ||
create: async (tenant) => { | ||
const creds = isMultitenant | ||
? await require('@sap/cds-mtxs/lib').xt.serviceManager.get(tenant, { disableCache: this.disableCache || false }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when is this.disableCache
set?
I think we need to enhance the error listener here.
Also if the credentials are wrong in mt scenario, we should not crash but stop fetching the credentials from service manager after e. g. 3 times.
hana/lib/drivers/hana-client.js
Outdated
maxPoolSize: 100, // TODO: align to options.pool configurations | ||
|
||
// If communicationTimeout is not set queries will hang for over 10 minutes | ||
communicationTimeout: 5000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are those properties "mappable" 1-1 to generic-pool settings?
…ds-dbs into hana-pool-configuration
Uses@sap/hana-client
native connection pool implementationnode-hdb
@sap/hana-client
credential mappings to the old HANA Service