Skip to content

Don't require RELOAD to keep exactly the same connection count - #1305

Merged
sgrif merged 1 commit into
mainfrom
sg-less-strict-reload-count
Aug 3, 2026
Merged

Don't require RELOAD to keep exactly the same connection count#1305
sgrif merged 1 commit into
mainfrom
sg-less-strict-reload-count

Conversation

@sgrif

@sgrif sgrif commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The goal of this test to ensure that the existing connections are reused when RELOAD is issued. However, the exact number of connections needed to perform schema loading might differ slightly each time depending on the exact timing of when the queries complete. It's fine if the connection count increases slightly, we mostly want to make sure it doesn't double. 10% should give us enough wiggle room for this test to test what it's trying to test without breaking as implementation details change

The goal of this test to ensure that the existing connections are reused
when `RELOAD` is issued. However, the exact number of connections needed
to perform schema loading might differ slightly each time depending on
the exact timing of when the queries complete. It's fine if the
connection count increases slightly, we mostly want to make sure it
doesn't double. 10% should give us enough wiggle room for this test to
test what it's trying to test without breaking as implementation details
change
@sgrif
sgrif requested a review from meskill August 3, 2026 16:55
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@levkk levkk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Disagree on premise, but agree that having a flaky test is disruptive and not worth the noise.

The idea of this test is very important: we need to be sure that RELOAD works adequately, i.e., connection count remains the same. I think the way to test this reliably is to have the pool at full capacity during reload, so no new connections can be created.

That way, if we see 10% more, that's definitely a bug.

Anyway, this is good as is, just keep it in the back of your mind for when you have a second. We might have unit test coverage for this as well, so this is completely fine to merge as-is.

@sgrif
sgrif merged commit 6cc0040 into main Aug 3, 2026
47 checks passed
@sgrif
sgrif deleted the sg-less-strict-reload-count branch August 3, 2026 18:10
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.

2 participants