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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid opening write stream more than once, make open method private #305

Merged
merged 3 commits into from Sep 20, 2021

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Sep 20, 2021

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 馃

@tswast tswast requested review from as code owners Sep 20, 2021
@tswast tswast requested a review from loferris Sep 20, 2021
@product-auto-label product-auto-label bot added the api: bigquerystorage label Sep 20, 2021
@google-cla google-cla bot added the cla: yes label Sep 20, 2021
@tswast tswast added the owlbot:run label Sep 20, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run label Sep 20, 2021
@tswast tswast requested a review from shollyman Sep 20, 2021
@@ -91,10 +91,11 @@ def __init__(
self._futures_queue = queue.Queue()
self._inital_request_template = initial_request_template
self._metadata = metadata
self._opening = threading.Lock()
Copy link
Contributor

@shollyman shollyman Sep 20, 2021

Choose a reason for hiding this comment

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

I'd recommend documenting here (and/or in _open) what the lock is actually guarding.

@tswast tswast added the automerge label Sep 20, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 58ec844 into googleapis:main Sep 20, 2021
9 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge label Sep 20, 2021
gcf-merge-on-green bot pushed a commit that referenced this issue Sep 27, 2021
馃 I have created a release \*beep\* \*boop\*
---
## [2.9.0](https://www.github.com/googleapis/python-bigquery-storage/compare/v2.8.0...v2.9.0) (2021-09-27)


### Features

* add `AppendRowsStream` to use write API from v1 endpoint ([#309](https://www.github.com/googleapis/python-bigquery-storage/issues/309)) ([9fc3c08](https://www.github.com/googleapis/python-bigquery-storage/commit/9fc3c08cdeebfbd69bc815f951a07b2d086b0a69))
* add BigQuery Storage Write API v1 ([#301](https://www.github.com/googleapis/python-bigquery-storage/issues/301)) ([69e3fb8](https://www.github.com/googleapis/python-bigquery-storage/commit/69e3fb8ec2ecac0417b6a4bc954004a064ae04b7))


### Bug Fixes

* add 'dict' annotation type to 'request' ([a778080](https://www.github.com/googleapis/python-bigquery-storage/commit/a7780805d7350855fccdcf2aefa596851ee83923))
* add missing read api retry setting on SplitReadStream ([#311](https://www.github.com/googleapis/python-bigquery-storage/issues/311)) ([66c09c0](https://www.github.com/googleapis/python-bigquery-storage/commit/66c09c01d643844117e3e35d2d90a6cc0491349e))
* avoid failure if closing `AppendRowsStream` before opening ([#304](https://www.github.com/googleapis/python-bigquery-storage/issues/304)) ([9f145f8](https://www.github.com/googleapis/python-bigquery-storage/commit/9f145f87d6a54e757044ff4110d2cafd57ce08fa))
* avoid opening write stream more than once, make open method private ([#305](https://www.github.com/googleapis/python-bigquery-storage/issues/305)) ([58ec844](https://www.github.com/googleapis/python-bigquery-storage/commit/58ec8444420d29c2915ec5b148de780a36eaf3e2))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants