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

Patch graceful shutdown bug #157

Merged
merged 2 commits into from
Sep 5, 2022

Conversation

zain-kabani
Copy link
Contributor

Fixes graceful shutdown bug for startup and cancel type ClientConnectionTypes

Adds logging for active clients when shutting down

@@ -204,7 +204,7 @@ pub async fn client_entrypoint(
Ok(mut client) => {
info!("Client {:?} connected (plain)", addr);

if client.is_admin() {
if !client.is_admin() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the opposite of what we're doing now. Could you describe the bug you're seeing?

Copy link
Contributor

@zainkabani zainkabani Sep 5, 2022

Choose a reason for hiding this comment

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

Recreating the bug.

Start pgcat.

Create client with sslmode disabled, ?sslmode=disable
execute single query then close connection.

Send sigint to pgcat

pgcat will want to wait for shutdown timeout

Copy link
Contributor

Choose a reason for hiding this comment

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

this is actually most likely a typo since in every other case we're doing !client.is_admin()

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right, very nice find.

@levkk levkk merged commit 417358c into postgresml:main Sep 5, 2022
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