Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: retry postgres connection on reset by peer in tests#18632

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 2 commits intomainfromspike/internal-695-retry-pg-reset-by-peer
Jun 27, 2025

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedJun 27, 2025
edited
Loading

Fixescoder/internal#695

Retries initial connection to postgres in testing up to 3 seconds if we see "reset by peer", which probably means that some other test proc just started the container.

@spikecurtisGraphite App
Copy link
ContributorAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@spikecurtisspikecurtisforce-pushed thespike/internal-695-retry-pg-reset-by-peer branch fromabc4510 to5c7efe5CompareJune 27, 2025 11:48
@spikecurtisspikecurtis marked this pull request as ready for reviewJune 27, 2025 11:49
@hugodutka
Copy link
Contributor

I believe a much simpler fix is this:#18423.openContainer uses a flock to serialize multiple binaries trying to start a postgres container at the same time, and has an early exit path if the container was already started. Do you see a reason this wouldn't be sufficient?

@spikecurtisGraphite App
Copy link
ContributorAuthor

That assumes that "reset by peer" can only happen if there is already a Docker container with the name we expect starting on the port.

If it uses a different name, or a non-Dockerized postgres is responsible for "reset by peer" then starting the container will fail due to port conflict, no?

Copy link
Contributor

@hugodutkahugodutka left a comment

Choose a reason for hiding this comment

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

We talked about it on Zoom and reached the conclusion that it's a good practice to handle retriable and non-retriable errors separately.

Co-authored-by: Hugo Dutka <hugo@coder.com>
@spikecurtisspikecurtisenabled auto-merge (squash)June 27, 2025 12:51
@spikecurtisspikecurtis merged commitf0251df intomainJun 27, 2025
35 checks passed
@spikecurtisspikecurtis deleted the spike/internal-695-retry-pg-reset-by-peer branchJune 27, 2025 13:03
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 27, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@hugodutkahugodutkahugodutka approved these changes

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

flake: postgresql connection reset
2 participants
@spikecurtis@hugodutka

[8]ページ先頭

©2009-2025 Movatter.jp