fix(worker): resolve goroutine leak and disk cache inefficiency - #2609
Open
rainbond-bot[bot] wants to merge 1 commit into
Open
fix(worker): resolve goroutine leak and disk cache inefficiency#2609rainbond-bot[bot] wants to merge 1 commit into
rainbond-bot[bot] wants to merge 1 commit into
Conversation
- Fix goroutine leak in ThirdComponent Discover methods by adding context cancellation checks before channel sends to prevent blocking when channel is full - Remove unnecessary GetAllVolumes() DB call in DiskCache that was discarding results, improving performance Ref #2144 Co-authored-by: yangkaa <yangkaa@users.noreply.github.com> Signed-off-by: claude[bot] <claude[bot]@users.noreply.github.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #2144
Summary
Fixes abnormal resource usage in rainbond-worker by addressing two root causes:
Goroutine leak in ThirdComponent Discover methods — When the channel (buffer=1024) is full, goroutines block forever on channel sends. This fix adds context cancellation checks so goroutines exit cleanly when ThirdComponents are deleted.
DiskCache performance — Removes an unnecessary DB call that was discarding results, reducing waste during disk size collection.
Changes
Generated with Claude Code