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: Allow StreamWriter settings to override passed in BQ client setting #2001

Merged
merged 8 commits into from Feb 23, 2023

Conversation

yirutang
Copy link
Contributor

@yirutang yirutang commented Feb 15, 2023

On StreamWriter, when user pass in a existing BQ client, we always used the old settings, and regional routing shouldn't have worked (since there is no header set).
From JsonWriter point of view, previously we always assign the internal BQ client to be null, so that the settings on Writer is respected and the BQ client passed into the JsonWriter is ignored (only used for JsonWriter level operations such as GetWriteStream). But the behavior is changed when allow BigQuery client to be passed through.

Clean up the behavior here to make it consistent and work for the long term. The behavior will be:
If bigquery client is passed in, then the setting will be inherited even though we always recreate a new client for the connection.
If bigquery client is passed in and StreamWriter has other explicit settings, we will override the setting use what is set explicitly on the Writer, and respect the rest of the bigquery client settings.

@yirutang yirutang requested review from a team and loferris February 15, 2023 01:34
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. labels Feb 15, 2023
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Feb 16, 2023
@yirutang yirutang changed the title fix: Allow StreamWriter seetings to override passed in BQ client setting fix: Allow StreamWriter settings to override passed in BQ client setting Feb 16, 2023
@yirutang yirutang added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 23, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 23, 2023
@gcf-owl-bot gcf-owl-bot bot requested a review from a team as a code owner February 23, 2023 22:11
@yirutang yirutang added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 23, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 23, 2023
@yirutang yirutang merged commit 66db8fe into googleapis:main Feb 23, 2023
gcf-merge-on-green bot pushed a commit that referenced this pull request Mar 1, 2023
🤖 I have created a release *beep* *boop*
---


## [2.33.0](https://togithub.com/googleapis/java-bigquerystorage/compare/v2.32.1...v2.33.0) (2023-03-01)


### Features

* Add header back to the client ([#2016](https://togithub.com/googleapis/java-bigquerystorage/issues/2016)) ([de00447](https://togithub.com/googleapis/java-bigquerystorage/commit/de00447958e5939d7be9d0f7da02323aabbfed8c))


### Bug Fixes

* Add client shutdown if request waiting in request queue for too long. ([#2017](https://togithub.com/googleapis/java-bigquerystorage/issues/2017)) ([91da88b](https://togithub.com/googleapis/java-bigquerystorage/commit/91da88b0ed914bf55111dd9cef2a3fc4b27c3443))
* Allow StreamWriter settings to override passed in BQ client setting ([#2001](https://togithub.com/googleapis/java-bigquerystorage/issues/2001)) ([66db8fe](https://togithub.com/googleapis/java-bigquerystorage/commit/66db8fed26474076fb5aaca5044d39e11f6ef28d))
* Catch uncaught exception from append loop and add expoential retry to reconnection ([#2015](https://togithub.com/googleapis/java-bigquerystorage/issues/2015)) ([35db0fb](https://togithub.com/googleapis/java-bigquerystorage/commit/35db0fb38a929a8f3e4db30ee173ce5a4af43d64))
* Remove write_location header pending discussion ([#2021](https://togithub.com/googleapis/java-bigquerystorage/issues/2021)) ([0941d43](https://togithub.com/googleapis/java-bigquerystorage/commit/0941d4363daf782e0be81c11fdf6a2fe0ff4d7ac))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.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 Issues related to the googleapis/java-bigquerystorage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants