Skip to content

Conversation

swilson-fly
Copy link
Contributor

Currently we're checking if the number of connections is greater-or-equal to 1. However the ConnectionCount query that runs doesn't exclude itself from the result set, so it always returns at least one.

The >= 1 check was added here: #200. This PR reverts back to the previous current >1 check.

An alternate way to fix this would be to change the query in the getCurrentConnCount func to use the SUCredentials instead of OperatorCredentials. This would run the query as the flypgadmin user (which is excluded from the query) instead of the Postgres user.

Currently we're checking if the number of connections is greater-or-equal to 1. However the ConnectionCount query that runs doesn't exclude itself from the result set, so it always returns at least one. 

The >= 1 check was added here: fly-apps#200. This PR reverts back to the previous `>1 ` check.
@davissp14 davissp14 requested a review from DAlperin March 29, 2024 14:40
Copy link
Contributor

@DAlperin DAlperin left a comment

Choose a reason for hiding this comment

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

Makes sense to me

@davissp14 davissp14 merged commit 7a62ede into fly-apps:master Apr 8, 2024
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