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: Add sample about processing permanent writer failure #2057

Merged
merged 12 commits into from Apr 3, 2023

Conversation

yirutang
Copy link
Contributor

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> ☕️

If you write sample code, please follow the samples format.

@yirutang yirutang requested review from a team as code owners March 22, 2023 23:51
@yirutang yirutang requested a review from tswast March 22, 2023 23:51
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Mar 22, 2023
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

  • google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/package-info.java
  • google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java
  • google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/package-info.java
  • samples/install-without-bom/pom.xml
  • samples/snapshot/pom.xml
  • samples/snippets/pom.xml

@product-auto-label product-auto-label bot added api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. samples Issues that are directly related to samples. labels Mar 22, 2023
@conventional-commit-lint-gcf
Copy link

conventional-commit-lint-gcf bot commented Mar 22, 2023

🤖 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: s Pull request size is small. and removed size: l Pull request size is large. labels Mar 22, 2023
@yirutang yirutang changed the title feat: Add sample about processing permanent writer failure. feat: Add sample about processing permanent writer failure Mar 22, 2023
@yirutang yirutang requested a review from GaoleMeng March 22, 2023 23:53
@@ -153,6 +157,16 @@ public void initialize(TableName parentTable)
public void append(AppendContext appendContext)
throws DescriptorValidationException, IOException {
synchronized (this.lock) {
if (streamWriter.isUserClosed()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do still need this? stream writer internally already has this check?

Copy link
Contributor

Choose a reason for hiding this comment

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

!streamWriter.isUserClosed() && streamWriter.isClosed() && recreateCount.getAndIncrement() < MAX_RECREATE_COUNT

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@yirutang yirutang added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 3, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 3, 2023
@yirutang yirutang added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 3, 2023
@yirutang yirutang merged commit 8eda934 into googleapis:main Apr 3, 2023
18 checks passed
gcf-merge-on-green bot pushed a commit that referenced this pull request Apr 13, 2023
🤖 I have created a release *beep* *boop*
---


## [2.35.0](https://togithub.com/googleapis/java-bigquerystorage/compare/v2.34.2...v2.35.0) (2023-04-13)


### Features

* Add public api to stream writer to set the maximum wait time ([#2066](https://togithub.com/googleapis/java-bigquerystorage/issues/2066)) ([1e9a8ca](https://togithub.com/googleapis/java-bigquerystorage/commit/1e9a8cac19c3748515ebff7990d02fd576c7dd23))
* Add sample about processing permanent writer failure ([#2057](https://togithub.com/googleapis/java-bigquerystorage/issues/2057)) ([8eda934](https://togithub.com/googleapis/java-bigquerystorage/commit/8eda9347a90f59ddcf99501f8b71ba17c5f3a143))
* Add schema aware stream writer ([#2048](https://togithub.com/googleapis/java-bigquerystorage/issues/2048)) ([ad136b9](https://togithub.com/googleapis/java-bigquerystorage/commit/ad136b9fa25e774a33d02fc3a82a76fb1152b5c5))


### Dependencies

* Update dependency com.google.cloud:google-cloud-bigquery to v2.24.4 ([#2070](https://togithub.com/googleapis/java-bigquerystorage/issues/2070)) ([ce9e962](https://togithub.com/googleapis/java-bigquerystorage/commit/ce9e96209cbafd5a4daa981c5e5252272dc9811a))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.7.0 ([#2077](https://togithub.com/googleapis/java-bigquerystorage/issues/2077)) ([b5ea788](https://togithub.com/googleapis/java-bigquerystorage/commit/b5ea788df26122dcdf3c7104658cc8fd35a38f72))

---
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:run Add this label to force Kokoro to re-run the tests. samples Issues that are directly related to samples. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants