Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

[Buddy] fix leaking go-routines in event-handler watcher #966

Merged
merged 6 commits into from
Nov 28, 2023

Conversation

Joerger
Copy link
Contributor

@Joerger Joerger commented Nov 3, 2023

Buddy PR for #963 with edits to resolve remaining comments.

@Joerger Joerger changed the title [Buddy] fix leaking go-routines in event-handler watcher [buddy] fix leaking go-routines in event-handler watcher Nov 3, 2023
@Joerger Joerger changed the title [buddy] fix leaking go-routines in event-handler watcher [Buddy] fix leaking go-routines in event-handler watcher Nov 3, 2023
@Joerger
Copy link
Contributor Author

Joerger commented Nov 3, 2023

I gave this some more thought and realized this one line fix is not a viable solution. This change allows the event handler to drop incomplete pages of events and move on to the next page. Instead, we need to update the event handler to only spawn a single goroutine at a time, instead of spawning new goroutines for new pages when we are still trying to finish a known page. Drafting for now as I won't have time to make this change immediately.

@Joerger Joerger marked this pull request as draft November 3, 2023 17:07
@Joerger Joerger force-pushed the joerger/pr-buddy-963 branch from 4319631 to 6984a71 Compare November 5, 2023 20:06
@Joerger
Copy link
Contributor Author

Joerger commented Nov 5, 2023

I gave another pass to this fix, and found it works after all. I've updated the tests to give better coverage to the event collection logic and cover the edge case I was concerned about.

@Joerger Joerger marked this pull request as ready for review November 5, 2023 20:07
@Joerger Joerger requested a review from zmb3 November 5, 2023 20:07
@Joerger Joerger force-pushed the joerger/pr-buddy-963 branch from ff7c61d to 9b199a2 Compare November 28, 2023 03:36
@Joerger Joerger requested a review from rosstimothy November 28, 2023 19:17
@Joerger
Copy link
Contributor Author

Joerger commented Nov 28, 2023

@zmb3 This is ready to review when you get a chance

@Joerger Joerger merged commit 2b8d5ee into master Nov 28, 2023
13 checks passed
@Joerger Joerger deleted the joerger/pr-buddy-963 branch November 28, 2023 21:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants