Skip to content

Conversation

@jbielick
Copy link

Purpose

This addresses some side effects of #565 in that when a connection falls out of sync (due to currently unknown series of events), the connection is detected as out of sync, but is checked back into the pool without any corrective action.

Approach

This updates server.rs to set its stats state to State::Error when we encounter a ProtocolOutOfSync error while reading from the server and decided whether to forward the message to the client. The result is that the connection will be disconnected when attempted to be checked back into the pool and the tainted connection will not be re-used.

This addresses some side effects of 565 in that when a connection falls
out of sync (due to currently unknown series of events), the connection
is detected as out of sync, but is checked back into the pool without
any corrective action.

This updates server.rs to set its stats state to State::Error when we
encounter a ProtocolOutOfSync error while reading from the server and
decided whether to forward the message to the client. The result is that
the connection will be disconnected when attempted to be checked back
into the pool and the tainted connection will not be re-used.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Collaborator

@levkk levkk left a comment

Choose a reason for hiding this comment

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

Awesome thank you so much. Happy to merge this in if you'd be willing to accept the CLA. Cheers!

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pgdog/src/backend/server.rs 93.10% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jbielick
Copy link
Author

if you'd be willing to accept the CLA. Cheers!

Working on approval for that. Will follow up as soon as I get it!

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