Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bigquery): processStream check ctx done when queuing non retryable err #10675

Merged

Conversation

alvarowolfx
Copy link
Contributor

@alvarowolfx alvarowolfx commented Aug 12, 2024

When service side returns non-retryable errors faster than they are being consumed by the user (via Next call), the processStream goroutine can become locked and leak, even when context is cancelled. With this PR, we wrap the call to it.errs call with select and check for context done.

Towards #10672

@alvarowolfx alvarowolfx requested a review from shollyman August 12, 2024 21:07
@alvarowolfx alvarowolfx requested review from a team as code owners August 12, 2024 21:07
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the BigQuery API. label Aug 12, 2024
Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

Thanks for consolidating the checks, definitely cleans up that process loop a bit.

@alvarowolfx alvarowolfx merged commit 60ad7f3 into googleapis:main Aug 13, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants