Skip to content

fix(bigquery): avoid double-channel-close during context cancellation - #7467

Merged
gcf-merge-on-green[bot] merged 3 commits into
googleapis:mainfrom
shollyman:fix-retry-markdone
Feb 22, 2023
Merged

fix(bigquery): avoid double-channel-close during context cancellation#7467
gcf-merge-on-green[bot] merged 3 commits into
googleapis:mainfrom
shollyman:fix-retry-markdone

Conversation

@shollyman

Copy link
Copy Markdown
Contributor

EnableWriteRetries exposes an issue with finalizing a pending write.
The appendWithRetry function incorrectly marks a pending write done
in certain situations (context cancellations), when responsibility
is held by it's callers.

PR adds fix and a test that exercises the failure condition.

Fixes: #7380

EnableWriteRetries exposes an issue with finalizing a pending write.
The appendWithRetry function incorrectly marks a pending write done
in certain situations (context cancellations), when responsibility
is held by it's callers.

PR adds fix and a test that exercises the failure condition.

Fixes: googleapis#7380
@shollyman
shollyman requested review from a team and loferris February 21, 2023 20:42
@product-auto-label product-auto-label Bot added the size: m Pull request size is medium. label Feb 21, 2023
@shollyman
shollyman requested review from alvarowolfx and removed request for loferris February 21, 2023 20:42
@codyoss codyoss changed the title fix: avoid double-channel-close during context cancellation fix(bigquery): avoid double-channel-close during context cancellation Feb 21, 2023
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Feb 22, 2023

@alvarowolfx alvarowolfx 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.

LGTM.

@shollyman shollyman added the automerge Merge the pull request once unit tests and other checks pass. label Feb 22, 2023
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit ca4b2ef into googleapis:main Feb 22, 2023
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 22, 2023
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. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bigquery/storage/managedwriter: EnableWriteRetries seems to lead to panics after ManagedStream context cancellation

2 participants