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

Catching up with TestKit #520

Merged
merged 19 commits into from
Aug 18, 2023
Merged

Conversation

robsdedude
Copy link
Member

@robsdedude robsdedude commented Aug 8, 2023

  1. Add support for routing table specific TestKit messaged (retrieving routing tables and forcing updates)
  2. Improve logging in the TestKit backend (all logs-driver and bolt-got both to stdout and TestKit) for easier debugging
  3. Overhaul how/when the driver drops servers from the cached routing table:
    • Move logic of deactivating servers on failures into the pool. This functionality should not only be present when using transaction functions.
    • Drop writers on certain error codes: Neo.ClientError.Cluster.NotALeader and Neo.ClientError.General.ForbiddenOnReadOnlyDatabase
  4. To simplify the code and avoid deadlocks or inconsistent driver states, both pool and router use blocking locks now. However, they will never perform IO while holding the lock removing the need for lock acquisition timeouts.

Depends on:

Log everything to stdout + TestKit socket.
The retry state is no longer responsible for invalidating servers on broken
connections. The pool and/or routing logic should take care of that. This is
necessary and logical since invalidation should happen regardless of which API
(session.Run, transaction.Run, ...) is used.

Pool and router no longer do any IO while holding locks. Hence, the locks can be
turned into blocking locks without risking blocking for too long.
fbiville and others added 2 commits August 9, 2023 14:46
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Copy link
Contributor

@StephenCathcart StephenCathcart left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

robsdedude and others added 6 commits August 17, 2023 16:08
Also removing error return value from all router.Invalidate* calls
TestKit expects the default database to be `null` not an empty string.
So we need to translate.
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
@robsdedude robsdedude merged commit 39d4411 into neo4j:5.0 Aug 18, 2023
@robsdedude robsdedude deleted the testkit-update-backend branch August 18, 2023 07:48
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