Skip to content

fix(bigquery): stop leaking gRPC streams, stream tasks - #6729

Merged
dbolduc merged 1 commit into
googleapis:mainfrom
dbolduc:fix-6715
Sep 8, 2026
Merged

fix(bigquery): stop leaking gRPC streams, stream tasks#6729
dbolduc merged 1 commit into
googleapis:mainfrom
dbolduc:fix-6715

Conversation

@dbolduc

@dbolduc dbolduc commented Sep 7, 2026

Copy link
Copy Markdown
Member

This was a legit bug. We were leaking open streams and the tasks running them when the application finished writing.

Fixes #6715

@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Sep 7, 2026

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

Copy link
Copy Markdown
Contributor

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 modifies the BigQuery write runner to explicitly drop the request_tx sender when the request receiver (req_rx) is closed (returns None), ensuring the stream is properly closed. It also adds a corresponding integration test stream_closes_when_client_drops_sender to verify this behavior. I have no feedback to provide.

@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.72%. Comparing base (8927911) to head (17f36c9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6729   +/-   ##
=======================================
  Coverage   96.71%   96.72%           
=======================================
  Files         313      313           
  Lines      101265   101290   +25     
=======================================
+ Hits        97938    97969   +31     
+ Misses       3327     3321    -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbolduc
dbolduc marked this pull request as ready for review September 7, 2026 18:01
@dbolduc
dbolduc requested a review from a team as a code owner September 7, 2026 18:01
@dbolduc
dbolduc merged commit 410c432 into googleapis:main Sep 8, 2026
42 checks passed
@dbolduc
dbolduc deleted the fix-6715 branch September 8, 2026 03:10
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.

AppendRows write runner fails to drop request_tx before drain_stream causing permanent hang

2 participants