Skip to content

fix(worker): resolve goroutine leak and disk cache inefficiency - #2609

Open
rainbond-bot[bot] wants to merge 1 commit into
V5.17from
claude/issue-2144-v5.17
Open

fix(worker): resolve goroutine leak and disk cache inefficiency#2609
rainbond-bot[bot] wants to merge 1 commit into
V5.17from
claude/issue-2144-v5.17

Conversation

@rainbond-bot

@rainbond-bot rainbond-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Ref #2144

Summary

Fixes abnormal resource usage in rainbond-worker by addressing two root causes:

  1. 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.

  2. DiskCache performance — Removes an unnecessary DB call that was discarding results, reducing waste during disk size collection.

Changes

  • — Add with before channel send
  • — Add non-blocking send with / and log warning on drop
  • — Remove unused call

Generated with Claude Code

- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-e2e Trigger second-layer E2E gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant