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

match libpq treatment of null byte in message header #953

Closed
wants to merge 1 commit into from
Closed

match libpq treatment of null byte in message header #953

wants to merge 1 commit into from

Conversation

rich-murphey
Copy link
Contributor

This is a partial fix for #886. Under a load of 128 concurrent queries, I see 90% fewer failed queries with this change.

This changes the behavior of the driver to match that of libpq. Namely, if a message header starts with a null byte, discard the message and continue without signaling an error.

This is only a partial fix. With this, I still see 1% of queries fail. That's better than 10%, but there's still an issue somewhere.

The issue is not due to dropping PgStream or BufStream. That is not occurring. I instrumented a Drop implementation for them and they are not dropped while the failed queries occur.

@rich-murphey
Copy link
Contributor Author

I'm going to go ahead and close this. @mehcode explaings the cause of this in #886, suggesting it's due to dropping a future in the middle of recv() of a message.

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