Skip to content

Conversation

@lutovich
Copy link
Contributor

@lutovich lutovich commented Apr 9, 2018

No description provided.

@lutovich lutovich requested a review from ali-ince April 9, 2018 17:26
@lutovich lutovich force-pushed the 1.5-tx-conn-error branch from ec7db41 to da01e2d Compare April 9, 2018 18:58
When establishing connection it was possible for `IOException` to get
propagated directly to the user without being wrapped in a
`ServiceUnavailableException`. This happened because `HandshakeHandler`
only wrapped security-related exceptions with driver exceptions. It was
problematic because rest of the codebase expects to deal with
`ServiceUnavailableException`s. For example rediscovery and retries
code can deal nicely with `ServiceUnavailableException`.

This commit fixes the problem by making `HandshakeHandler` wrap all
non-security related exceptions in `ServiceUnavailableException`.
@lutovich lutovich force-pushed the 1.5-tx-conn-error branch from da01e2d to 7589646 Compare April 9, 2018 20:26
Fatal errors terminate the transaction. It will fail to commit when
terminated and rollback will be a no-op. All outstanding errors from
previous queries should still be propagated.

Previously transaction checked it's terminated status too early and
sometimes did not propagate pending errors. This commit fixes the
problem by moving the termination check to a place where all result
cursors are fully fetched. So errors from cursors will always get
propagated.

Also added a constant for default `RoutingSettings` for convenience.
@lutovich lutovich force-pushed the 1.5-tx-conn-error branch from 7589646 to 87a46c8 Compare April 9, 2018 20:36
Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

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

LGTM!

@ali-ince
Copy link
Contributor

@lutovich waiting for the tests to go green before merging.

Use direct drivers to fetch cluster overview from cores, instead of
routing driver and write session. Wait for at most 60 seconds.
@lutovich lutovich merged commit ef48d78 into neo4j:1.5 Apr 13, 2018
@lutovich lutovich deleted the 1.5-tx-conn-error branch April 13, 2018 16:08
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