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

feat: always pass a null bigquery client lib to StreamWriter #1795

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

yirutang
Copy link
Contributor

@yirutang yirutang commented Sep 22, 2022

In order for regional routing to work, right now, we need to recreate a BigQueryWriteClient with custom header on StreamWriter. The new JsonWriter builder interface we added requires a not null BigQueryClient in order to be able to call GetWriteStream, if the user always pass in BigQueryWriteClient, in the current code, we reuses that BigQueryWriteClient and then the customer header will not be added and routing will fail.

So no matter whether we have an existing BigQueryWriteClient or not on the json writer, we always ask StreamWriter to create a new BigQueryWriteClient in order for routing to work. We are working on the backend to make this special workaround no longer needed.

@yirutang yirutang requested review from a team and alvarowolfx September 22, 2022 23:28
@conventional-commit-lint-gcf
Copy link

conventional-commit-lint-gcf bot commented Sep 22, 2022

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. labels Sep 22, 2022
@yirutang yirutang requested a review from Neenu1995 September 22, 2022 23:28
@Neenu1995 Neenu1995 added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Sep 22, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 22, 2022
@Neenu1995 Neenu1995 added the automerge Merge the pull request once unit tests and other checks pass. label Sep 22, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit eec50c1 into googleapis:main Sep 22, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Sep 22, 2022
gcf-merge-on-green bot pushed a commit that referenced this pull request Sep 30, 2022
🤖 I have created a release *beep* *boop*
---


## [2.22.0](https://togithub.com/googleapis/java-bigquerystorage/compare/v2.21.0...v2.22.0) (2022-09-29)


### Features

* Add a new specific exception about json data has unknown field ([#1792](https://togithub.com/googleapis/java-bigquerystorage/issues/1792)) ([18f93c1](https://togithub.com/googleapis/java-bigquerystorage/commit/18f93c124334464a951b3d3065bdf11bbda13dac))
* Add cache for location in stream writer, and trigger that when location is not presented ([#1804](https://togithub.com/googleapis/java-bigquerystorage/issues/1804)) ([c24c14f](https://togithub.com/googleapis/java-bigquerystorage/commit/c24c14f14b1a6f8249f55630d51e3cadd500c1ad))
* Add close() to multiplexing client ([#1788](https://togithub.com/googleapis/java-bigquerystorage/issues/1788)) ([6b3a974](https://togithub.com/googleapis/java-bigquerystorage/commit/6b3a97491bf718333ae7c085f9b10723d8b24388))
* Add fully managed schema support on json writer ([#1794](https://togithub.com/googleapis/java-bigquerystorage/issues/1794)) ([b6b515f](https://togithub.com/googleapis/java-bigquerystorage/commit/b6b515f57a0f6956c9d9f902a5e3e16edc845a48))
* Add more retry error code to the sample ([#1805](https://togithub.com/googleapis/java-bigquerystorage/issues/1805)) ([4bf67bc](https://togithub.com/googleapis/java-bigquerystorage/commit/4bf67bcf0de2d370f0b04d8df236d30466b91598))
* Add multiplexing client core algorithm and basic testing, plus fix a tiny bug in fake server ([#1787](https://togithub.com/googleapis/java-bigquerystorage/issues/1787)) ([1bb8e26](https://togithub.com/googleapis/java-bigquerystorage/commit/1bb8e262941f570d7f2de60123ec5a6a0cf43600))
* Add multiplexing support to connection worker.  ([#1784](https://togithub.com/googleapis/java-bigquerystorage/issues/1784)) ([a869a1d](https://togithub.com/googleapis/java-bigquerystorage/commit/a869a1d8baba3cc0f6046d661c6f52ec12a3f12d))
* Add support for flexible column name in JsonStreamWriter ([#1786](https://togithub.com/googleapis/java-bigquerystorage/issues/1786)) ([694abbb](https://togithub.com/googleapis/java-bigquerystorage/commit/694abbb43bf2970cd81803521c349dc31a38f484))
* Add two fine logs that would allow Datastream to look into the stuck issue ([#1791](https://togithub.com/googleapis/java-bigquerystorage/issues/1791)) ([745ceb4](https://togithub.com/googleapis/java-bigquerystorage/commit/745ceb46dec5922efe394773028532dcd84a4f9b))
* Always pass a null bigquery client lib to StreamWriter ([#1795](https://togithub.com/googleapis/java-bigquerystorage/issues/1795)) ([eec50c1](https://togithub.com/googleapis/java-bigquerystorage/commit/eec50c14e1dff84ae9a3e70f9d08d27b9e225e55))
* Bug fix for checking write_stream field but proto might not contain the field to unblock the release ([#1806](https://togithub.com/googleapis/java-bigquerystorage/issues/1806)) ([9791d69](https://togithub.com/googleapis/java-bigquerystorage/commit/9791d693c75367bec6451ebf65ae4ea3347bf50f))
* Client unknown fields drives writer refreshment ([#1797](https://togithub.com/googleapis/java-bigquerystorage/issues/1797)) ([d8aaed5](https://togithub.com/googleapis/java-bigquerystorage/commit/d8aaed522b9de487539165ea662465e5a96222f1))
* ExecutorProvider can now be replaced ([#1770](https://togithub.com/googleapis/java-bigquerystorage/issues/1770)) ([6380f71](https://togithub.com/googleapis/java-bigquerystorage/commit/6380f713b8f42fa3a58df2750ea2cf3b7397d29c)), closes [#1769](https://togithub.com/googleapis/java-bigquerystorage/issues/1769)
* Fix some todos and reject stream writer if it's created with mixed behavior of passed in client or not ([#1803](https://togithub.com/googleapis/java-bigquerystorage/issues/1803)) ([1a69192](https://togithub.com/googleapis/java-bigquerystorage/commit/1a69192e2ffc6475a7e4b67c5a452f1c0e8aaddc))
* Minor tune after offline testing  ([#1807](https://togithub.com/googleapis/java-bigquerystorage/issues/1807)) ([694a870](https://togithub.com/googleapis/java-bigquerystorage/commit/694a870bac623ef038168a4358b9d73972077edb))
* Populate location info if we already called GetWriteStream ([#1802](https://togithub.com/googleapis/java-bigquerystorage/issues/1802)) ([5f43103](https://togithub.com/googleapis/java-bigquerystorage/commit/5f4310321e7f90385f7ef5c32e3e5395f719d0ca))
* Some fixes for multiplexing client  ([#1798](https://togithub.com/googleapis/java-bigquerystorage/issues/1798)) ([b3ffd77](https://togithub.com/googleapis/java-bigquerystorage/commit/b3ffd77e4b86708f241ba517c55bb3508964bc0e))
* Wire connection pool to stream writer without implementing updated schema  ([#1790](https://togithub.com/googleapis/java-bigquerystorage/issues/1790)) ([3eb1475](https://togithub.com/googleapis/java-bigquerystorage/commit/3eb147545db2415e5a68752b8ede1c4d342d1a84))

---
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. kokoro:force-run Add this label to force Kokoro to re-run the tests. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants