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

breaking! Remove internal mutex boxing of connections #134

Merged
merged 4 commits into from
Nov 12, 2023

Conversation

knutwalker
Copy link
Collaborator

@knutwalker knutwalker commented Nov 11, 2023

Connections are no longer always wrapped in an Arc<Mutex<>>.

This actually introduces a number of breaking changes:

  • Graph::execute returns a DetachedRowStream instead of a RowStream (name pending)
    The API is identical, but it's a different type
  • Txn::execute continues to return a RowStream, but its API changed:
    • RowStream::next required a TransactionHandle, which can be obtained by calling Txn::handle
    • This method is defined as fn handle(&mut self), which means that the synchronization of concurrent query streams within a single transactions must now be handled by the user
    • The same is true for all other methods consuming the RowStream
  • Txn methods now require &mut self instead of &self

Signed-off-by: Paul Horn <dev@knutwalker.engineer>
…location

Signed-off-by: Paul Horn <dev@knutwalker.engineer>
This is a breaking change:

- transactions must be marked as mut
- row stream APIs require a handle to use
@knutwalker knutwalker requested a review from s1ck November 12, 2023 11:51
@knutwalker knutwalker merged commit 610936e into neo4j-labs:master Nov 12, 2023
25 checks passed
@knutwalker knutwalker deleted the arc-no-mutex branch November 12, 2023 11:53
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.

1 participant