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

fix: deadlock when waiting on inflight events of a trigger #1073

Merged
merged 4 commits into from
Feb 15, 2025

Conversation

StarpTech
Copy link
Collaborator

@StarpTech StarpTech commented Feb 15, 2025

This PR fixes an issue where WaitGroup.Wait caused a deadlock with the progressing update events because waiting in the event loop starves it forever.

Additionally, I removed the field done, which caused a race with a concurrent event from the WS providers. It also wasn't useful at all.

I battle-tested the change with a load test scenario where connections are reestablished multiple times a second.

@StarpTech StarpTech changed the title fix: data race when waiting on inflight events of a trigger fix: deadlock when waiting on inflight events of a trigger Feb 15, 2025
Copy link
Member

@Aenimus Aenimus left a comment

Choose a reason for hiding this comment

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

LGTM

@StarpTech StarpTech merged commit 8a2b33c into master Feb 15, 2025
10 checks passed
@StarpTech StarpTech deleted the dustin/fix-data-race-wait-subs branch February 15, 2025 21:24
Aenimus pushed a commit that referenced this pull request Feb 15, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.0.0-rc.155](v2.0.0-rc.154...v2.0.0-rc.155)
(2025-02-15)


### Bug Fixes

* deadlock when waiting on inflight events of a trigger
([#1073](#1073))
([8a2b33c](8a2b33c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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