Skip to content

lock free driver #286

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

Merged
merged 1 commit into from
Dec 5, 2016
Merged

lock free driver #286

merged 1 commit into from
Dec 5, 2016

Conversation

zhenlineo
Copy link
Contributor

@zhenlineo zhenlineo commented Dec 1, 2016

This PR ensures that after a driver is closed, no new session could be started.

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.

@zhenlineo PR looks good. Could we maybe have some tests with mocks that check we close resources in #session() when driver is closed?

// For 1. this closeResources will take no effect as everything is already closed.
// For 2. this closeResources will close the new connection pool just created to ensure no resource leak.
closeResources();
throw new IllegalStateException( "This driver instance has already been closed" );
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe pull creation of this exception in a method so it is not duplicated here and in assertOpen

This PR ensure that after a driver is closed, no new session could be started.
@lutovich lutovich merged commit 6b5bcc3 into neo4j:1.1 Dec 5, 2016
@zhenlineo zhenlineo deleted the 1.1-lock-free branch January 19, 2017 13:15
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