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

fix: fix race condition in pubsub startup#17088

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 1 commit intomainfromspike/internal-525-pubsub
Mar 25, 2025

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedMar 25, 2025
edited
Loading

fixescoder/internal#525

If the context is canceled, the goroutine that is supposed to read from theerrCh could exit prematurely, leading to a goroutine leak. Refactors this code so it cannot block.

@spikecurtisGraphite App
Copy link
ContributorAuthor

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

@spikecurtisspikecurtis marked this pull request as ready for reviewMarch 25, 2025 12:37
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Except for the one question/concern, LGTM 👍🏻

}
errCh <- err // won't block because we are buffered.
sentErrCh = true
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to protect this or is sequential execution guaranteed?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

It executes sequentially, at least by inspection. There is always a chance they could change the implementation and call-back concurrently, but it didn't seem worth while defending for that.

@spikecurtisspikecurtis merged commit5f3a53f intomainMar 25, 2025
37 checks passed
@spikecurtisGraphite App
Copy link
ContributorAuthor

Merge activity

  • Mar 25, 8:45 AM EDT: A user merged this pull request withGraphite.

@spikecurtisspikecurtis deleted the spike/internal-525-pubsub branchMarch 25, 2025 12:45
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 25, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Pubsub goroutine leak
2 participants
@spikecurtis@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp