Skip to content

fix(go/exporter): Make sure all channels readers/writers are context-cancellable#4223

Merged
michaelkedar merged 2 commits into
google:masterfrom
michaelkedar:go-export
Oct 22, 2025
Merged

fix(go/exporter): Make sure all channels readers/writers are context-cancellable#4223
michaelkedar merged 2 commits into
google:masterfrom
michaelkedar:go-export

Conversation

@michaelkedar
Copy link
Copy Markdown
Member

When the context was being cancelled, the ecosystemRouter seems to have been getting stuck, causing go to ungracefully terminate the program due to deadlock.

@michaelkedar
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively addresses a potential deadlock in the ecosystemRouter by ensuring all channel read and write operations are cancellable via context. The changes correctly use select statements with ctx.Done() to handle cancellation gracefully, which is a significant improvement for the exporter's robustness and shutdown behavior. The overall implementation is clean and follows idiomatic Go practices for concurrency.

Comment thread go/cmd/exporter/exporter.go Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@michaelkedar michaelkedar merged commit 9b98e84 into google:master Oct 22, 2025
17 checks passed
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