Skip to content
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

implemented maxConnectionPoolSize logic #289

Merged
merged 4 commits into from
Sep 22, 2017

Conversation

ali-ince
Copy link
Contributor

No description provided.

@ali-ince ali-ince requested a review from lutovich September 20, 2017 14:06
Copy link
Contributor

@lutovich lutovich left a comment

Choose a reason for hiding this comment

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

@ali-ince changes look good. Made couple minor comments. Maybe also worth adding an integration test for max connections. All this can be done in a separate PR.

@@ -59,7 +59,11 @@ class Driver {
this._createConnection.bind(this),
this._destroyConnection.bind(this),
this._validateConnection.bind(this),
config.connectionPoolSize
{
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about adding a dedicated PoolConfig class for this object?
Then it will be possible to specify type of config constructor parameter in Pool in JSDoc and get autocompletion from Intellij.

if (!pool) {
pool = [];
this._pools[key] = pool;
let resource = this._acquire(key);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe change lets and vars to consts in this class, where possible.

@@ -114,6 +116,22 @@ function trimAndVerify(string, name, url) {
return result;
}

function promiseOrTimeout(timeout, otherPromise, onTimeout) {
let timeoutPromise = new Promise((resolve, reject) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use const

@lutovich lutovich merged commit d7d7476 into neo4j:1.5 Sep 22, 2017
@ali-ince ali-ince deleted the 1.5-max-connection-pool-size branch November 27, 2017 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants