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

Deprecated 'idleConnectionPoolSize' config option #432

Merged
merged 3 commits into from
Nov 24, 2017

Conversation

lutovich
Copy link
Contributor

Newly added 'maxConnectionPoolSize' option should be used instead.

@lutovich lutovich requested a review from zhenlineo November 20, 2017 13:05
Copy link
Contributor

@zhenlineo zhenlineo left a comment

Choose a reason for hiding this comment

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

Wonder if it makes sense to not mix maxIdle and max size, as they are kind of different in meanings?

* @return the max number of connections
* @deprecated please use {@link #maxConnectionPoolSize()} instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest changing to Please consider to use #maxConnectionPoolSize and #MaxConnectionLifetime to replace this method instead.

Same applies for comments of all MaxIdle methods

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Improved javadoc with your suggestion for withMaxSessions, withMaxIdleSessions, and withMaxIdleConnections.

*/
@Deprecated
public ConfigBuilder withMaxIdleSessions( int size )
{
this.maxIdleConnectionPoolSize = size;
return this;
return withMaxConnectionPoolSize( size );
Copy link
Contributor

Choose a reason for hiding this comment

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

I was about to suggest to give a warning here, but then realized we might do not have a logger till this moment...

I feel we should not delegate maxIdle to max, as this config changes meaning already.
I am wondering if it makes sense to just ignore the value we set to this method. What do you think of the following changes?

MaxPoolSize -> MaxConnectionPoolSize
MaxIdleConnections -> ignored
MaxIdleSessions -> ignored

Copy link
Contributor

Choose a reason for hiding this comment

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

Since we do not have any idle connection checking in place on the async implementation, ignoring MaxIdleConnections and MaxIdleSessions config values makes more sense for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. I agree, will change

@lutovich
Copy link
Contributor Author

@zhenlineo, @ali-ince suggested config change implemented

@lutovich lutovich force-pushed the 1.5-deprecate-idleConnectionPoolSize branch from 54569ed to e0ed529 Compare November 23, 2017 10:31
Newly added 'maxConnectionPoolSize' option should be used instead.
These two config settings will now be ignored and not delegate to
`maxConnectionPoolSize`. This feels better because logic of enforcing
"max idle" is now gone.
@lutovich lutovich force-pushed the 1.5-deprecate-idleConnectionPoolSize branch from e0ed529 to b8db2f0 Compare November 23, 2017 21:44
@zhenlineo zhenlineo merged commit 5613e17 into neo4j:1.5 Nov 24, 2017
@lutovich lutovich deleted the 1.5-deprecate-idleConnectionPoolSize branch November 24, 2017 10:37
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.

3 participants