Introduce session#263
Merged
Merged
Conversation
9e42dbd to
fe8a52a
Compare
knutwalker
suggested changes
Sep 15, 2025
knutwalker
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this PR, well done! I have some minor things around avoid allocations/clones here and there, but I would like to have at least the readme being fixed before merging
Contributor
|
Also a note on the MSRV, there are multiple dependencies that already have a higher MSRV than 1.75. We do downgrade/pin those dependencies when generating the lockfiles for CI ( Lines 68 to 73 in 2b571c4 Lines 100 to 106 in 2b571c4 neo4rs on the MSRV version without also having to downgrade on their end (which they would have to do anyway).We still have the latest (or reasonably latest) versions in the dependencies, so that you don't have to use older versions and recent rust versions. I have a preference to "pin" time to |
Contributor
|
actually, I did the changes in #265 -- you should be able to keep 1.75 after rebasing |
3e0d050 to
39726fd
Compare
…t when creating the pool
2b48719 to
3d45b5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the concept of sessions when enabling the feature flag unstable-bolt-protocol-impl-v2.
The driver now provides a with_session method, allowing a session to be created on an existing connection. Sessions can be used to specify the target database, impersonate a user, and set the fetch size for queries. Bookmark handling has also been corrected to work properly within sessions.
Additionally, this PR updates the routing logic, as support for user impersonation required changes in that area.
Unfortunately, the changes are many and the PR is quite big.
Routing Refactor
Due to a deadlock caused by the use of DashMaps in the connection registry, this PR includes a complete refactor of the routing protocol. The router is now lazy and no longer relies on a separate task to fetch routing tables. This simplifies the design and improves code readability.
Graph Structure API
The PR changes the Graph structure API: the method
execute_onis now forcing the user to pass the operation to perform (read or write) in order to pick the right server from the routing table.