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: More robust STREAM_RST logic #1102

Merged
merged 3 commits into from May 31, 2021

Conversation

emkornfield
Copy link
Contributor

@emkornfield emkornfield commented May 27, 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:

  • [ 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 a review from as a code owner May 27, 2021
@product-auto-label product-auto-label bot added the api: bigquerystorage label May 27, 2021
@google-cla google-cla bot added the cla: yes label May 27, 2021
@emkornfield
Copy link
Contributor Author

@emkornfield emkornfield commented May 27, 2021

kmjung
kmjung approved these changes May 27, 2021
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

@kmjung kmjung May 27, 2021

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

@emkornfield emkornfield May 28, 2021

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
Member

@stephaniewang526 stephaniewang526 commented May 30, 2021

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

|| status.getDescription().contains("Received Rst ")
|| status.getDescription().contains("RST_STREAM"));
Copy link
Member

@stephaniewang526 stephaniewang526 May 30, 2021

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

@emkornfield emkornfield May 31, 2021

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
Member

@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!

emkornfield and others added 3 commits May 31, 2021
…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
16 checks passed
gcf-merge-on-green bot pushed a commit that referenced this issue 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 issue Jun 1, 2021
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

3 participants