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: custom retry logic #174

Closed
wants to merge 2 commits into from

Conversation

pmakani
Copy link
Contributor

@pmakani pmakani commented Apr 15, 2020

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 #86

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 15, 2020
@stephaniewang526 stephaniewang526 mentioned this pull request Apr 15, 2020
4 tasks
Copy link
Contributor

@kmjung kmjung left a comment

Choose a reason for hiding this comment

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

In general I understand the approach here and it makes sense to me. A couple of questions.


import com.google.cloud.grpc.BaseGrpcServiceException;

public class BigQueryStorageException extends BaseGrpcServiceException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Am I right in understanding that exceptions which are visible to end users today are all BaseGrpcServiceExceptions, and so this should prevent this change from being a breaking change from a user perspective? I'm wondering about the case where a caller has already implemented their own special-case handling for e.g. exceptions produced on INTERNAL error responses from the server.

status.getDescription(),
throwable.getCause(),
status.getCode().value(),
isRetryable(ErrorCode.fromGrpcStatus(status), throwable.getCause()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this sufficient to cause the client to retry on failure? I don't see a test which verifies the retry behavior.

@codecov
Copy link

codecov bot commented Apr 15, 2020

Codecov Report

Merging #174 into master will decrease coverage by 0.09%.
The diff coverage is 71.91%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #174      +/-   ##
============================================
- Coverage     74.09%   73.99%   -0.10%     
- Complexity      320      326       +6     
============================================
  Files            42       45       +3     
  Lines          2227     2315      +88     
  Branches         71       82      +11     
============================================
+ Hits           1650     1713      +63     
- Misses          546      562      +16     
- Partials         31       40       +9     
Impacted Files Coverage Δ Complexity Δ
...stub/readrows/BigQueryStorageExceptionFactory.java 62.68% <62.68%> (ø) 3.00 <3.00> (?)
...uery/storage/v1/stub/EnhancedBigQueryReadStub.java 82.50% <100.00%> (ø) 6.00 <1.00> (ø)
...age/v1/stub/readrows/BigQueryStorageException.java 100.00% <100.00%> (ø) 1.00 <1.00> (?)
...torage/v1/stub/readrows/ReadRowsRetryCallable.java 100.00% <100.00%> (ø) 2.00 <2.00> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update caae033...73f5d9e. Read the comment docs.

@pmakani pmakani closed this May 8, 2020
@pmakani pmakani deleted the bigquery-storage-86 branch May 8, 2020 15:12
shubhwip pushed a commit to shubhwip/java-bigquerystorage that referenced this pull request Oct 7, 2023
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] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-storage-nio/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)

Fixes googleapis#173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bigquerystorage, Java] Reconnect on "EOS on DATA frame" Internal Server Errors
3 participants