Skip to content

fix: goroutine leak and dropped WithContext return value#167

Open
pabloszel11 wants to merge 2 commits intomainfrom
fix/goroutineLeak-dbContextDropped
Open

fix: goroutine leak and dropped WithContext return value#167
pabloszel11 wants to merge 2 commits intomainfrom
fix/goroutineLeak-dbContextDropped

Conversation

@pabloszel11
Copy link
Copy Markdown
Contributor

  • fix goroutine leak in Transaction -- Remove the unnecessary goroutine and channel in resource_repository.go:138-153. Call txFunc directly within GORM's Transaction callback. One-line fix that eliminates goroutine leak and use-after-rollback race under context cancellation.
  • fix dropped WithContext return value -- Change dbCon.WithContext(ctx) to dbCon = dbCon.WithContext(ctx) in postgres.go:25 so context propagation actually applies to the DB handle.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7f91edb1-8ef6-4d6d-8f75-8894bd751f05

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@push-tags-from-workflow push-tags-from-workflow Bot added the bug Something isn't working label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant