-
Notifications
You must be signed in to change notification settings - Fork 85
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
Conversation
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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())); |
There was a problem hiding this comment.
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 Report
@@ 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
Continue to review full report at Codecov.
|
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
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:
Fixes #86