Skip to content

Routing driver forgets addresses on some errors #176

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 3 commits into from
Aug 23, 2017

Conversation

lutovich
Copy link
Contributor

This PR makes routing driver forget addresses and purge their connections on network and database errors. It also makes driver forget write server addresses when they fail as writers, connections remain in the pool because such machines can remain readers/routers.

@lutovich lutovich requested a review from technige July 20, 2017 22:34
@zhenlineo
Copy link
Contributor

LGTM. CC @technige

Copy link
Contributor

@technige technige left a comment

Choose a reason for hiding this comment

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

Not keen on the error_handler changes to connection.py. It's quite unusual to dynamically attach methods in this way and the new try...except blocks catch all Exception types, which is generally considered too brute force.

I'm happy to pair on this.

@lutovich
Copy link
Contributor Author

lutovich commented Aug 4, 2017

@technige dynamic error_handler is now replaced by constructor injection of ConnectionErrorHandler. Later is different for direct and routing driver.

This commit makes routing driver forget addresses and purge their
connections on network and database errors. It also makes driver
forget write server addresses when they fail as writers, connections
remain in the pool because such machines can remain readers/routers.
To avoid comparing strings when handling routing errors.
Connection now takes a dedicated error handler object in constructor
instead of having one dynamically attached after creation.
@lutovich lutovich force-pushed the 1.5-forget-addresses-on-errors branch from 32274af to 9edcf42 Compare August 23, 2017 08:31
@praveenag praveenag merged commit ffcc17c into neo4j:1.5 Aug 23, 2017
@lutovich lutovich deleted the 1.5-forget-addresses-on-errors branch August 25, 2017 10:18
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.

4 participants