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

postgres: atomic read message #1103

Closed

Conversation

rich-murphey
Copy link
Contributor

Here is an attempt to address #886. It peeks at the message header, then consumes the message, all or none.

This looks very awkward compared to the way it's done in the 'next' branch. As a result, I'm not entirely sure whether it may have a performance impact.

This is just an idea for the sake of discussion, so feel free to close this if it's not a preferred way of approaching the issue.

@rich-murphey
Copy link
Contributor Author

I think there may be an off-by-one error somewhere in this PR. While testing dropped streams, I'm seeing:

 sqlx_actix_streaming::bytestream:dropped ByteStream in state: NonEmpty after 71 items
 sqlx_core::pool::connection:error occurred while testing the connection on-release: encountered unexpected or invalid data: encountered unexpected or invalid data: unknown message type: '\"'

@rich-murphey
Copy link
Contributor Author

I'm closing this because additional effort would be better spent on the 'next' branch.

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.

None yet

1 participant