KEMBAR78
fix: More robust STREAM_RST logic by emkornfield · Pull Request #1102 · googleapis/java-bigquerystorage · GitHub
Skip to content

Conversation

@emkornfield
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:

  • [ x ] Ensure the tests and linter pass
  • [ x ] Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

This change makes error matching against stream rst more robust. Customers have started to see other variants with RST stream. The capitalization of "Rst Stream" isn't clear, other repose have it lower cased: (e.g. https://github.com/googleapis/java-bigtable-hbase/pull/3000/files)

@emkornfield emkornfield requested review from a team and stephaniewang526 May 27, 2021 23:42
@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. label May 27, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 27, 2021
@emkornfield
Copy link
Contributor Author

CC @kmjung @davidrabinowitz

return status.getCode() == Status.Code.INTERNAL
&& status.getDescription() != null
&& (status.getDescription().contains("Received unexpected EOS on DATA frame from server")
|| status.getDescription().contains("Received Rst ")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: is there a reason to drop " Stream" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, from PR description:

The capitalization of "Rst Stream" isn't clear, other repose have it lower cased: (e.g. https://github.com/googleapis/java-bigtable-hbase/pull/3000/files)

@stephaniewang526
Copy link
Contributor

Please update initial commit and subject line of this PR to abide by conventional commit rules.

Comment on lines 34 to 35
|| status.getDescription().contains("Received Rst ")
|| status.getDescription().contains("RST_STREAM"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just check for status.getDescription.toLowercase().contains("rst")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. "rst" can occur naturally in other settings. I shortened the top one to just be " Rst ". I also added some other messages from spark-bigquery-connector.

Copy link
Contributor

@stephaniewang526 stephaniewang526 May 31, 2021

Choose a reason for hiding this comment

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

okay lgtm thank you!

Micah Kornfield and others added 3 commits May 30, 2021 20:05
…gquery/storage/util/Errors.java

Co-authored-by: Stephanie Wang <stephaniewang526@users.noreply.github.com>
…gquery/storage/util/ErrorsTest.java

Co-authored-by: Stephanie Wang <stephaniewang526@users.noreply.github.com>
@emkornfield emkornfield changed the title More robust STREAM_RST logic fix: More robust STREAM_RST logic May 31, 2021
@stephaniewang526 stephaniewang526 merged commit dd67534 into googleapis:master May 31, 2021
gcf-merge-on-green bot pushed a commit that referenced this pull request May 31, 2021
🤖 I have created a release \*beep\* \*boop\*
---
## [1.22.0](https://www.github.com/googleapis/java-bigquerystorage/compare/v1.21.1...v2.0.0) (2021-05-31)


### ⚠ BREAKING CHANGES

* remove default deadline for AppendRows API (#1101)

### Features

* add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#1092](https://www.github.com/googleapis/java-bigquerystorage/issues/1092)) ([9fe34d1](https://www.github.com/googleapis/java-bigquerystorage/commit/9fe34d1a7ea2b4c1f750fd8805251811a4b0111d))


### Bug Fixes

* More robust STREAM_RST logic ([#1102](https://www.github.com/googleapis/java-bigquerystorage/issues/1102)) ([dd67534](https://www.github.com/googleapis/java-bigquerystorage/commit/dd675343b20d614eaf715306f1151532a3a2c33f))
* remove default deadline for AppendRows API ([#1101](https://www.github.com/googleapis/java-bigquerystorage/issues/1101)) ([87cadf0](https://www.github.com/googleapis/java-bigquerystorage/commit/87cadf01edbdaf876699e98f027835d6594f8072))


### Dependencies

* update arrow.version to v4.0.1 ([#1103](https://www.github.com/googleapis/java-bigquerystorage/issues/1103)) ([b2e3489](https://www.github.com/googleapis/java-bigquerystorage/commit/b2e34894f443075ce375b822babcfc329b34c76c))
* update dependency com.google.truth:truth to v1.1.3 ([#1100](https://www.github.com/googleapis/java-bigquerystorage/issues/1100)) ([12c401f](https://www.github.com/googleapis/java-bigquerystorage/commit/12c401feec1fb7fbaf39ea7ccffee4a02faffeb3))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
davidrabinowitz added a commit to davidrabinowitz/spark-bigquery-connector that referenced this pull request Jun 1, 2021
shubhwip pushed a commit to shubhwip/java-bigquerystorage that referenced this pull request Oct 7, 2023
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. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants