-
Notifications
You must be signed in to change notification settings - Fork 9
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
Return clear dial errors #445
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #445 +/- ##
==========================================
+ Coverage 51.65% 51.70% +0.05%
==========================================
Files 159 159
Lines 19840 19841 +1
==========================================
+ Hits 10248 10259 +11
+ Misses 8820 8807 -13
- Partials 772 775 +3 ☔ View full report in Codecov by Sentry. |
Fix came from nspcc-dev/neofs-api-go#445 for the problem described in nspcc-dev/neofs-node#2561. Фlso now any irreparable errors like invalid address will be returned immediately, not upon reaching the deadline. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Fix came from nspcc-dev/neofs-api-go#445 for the problem described in nspcc-dev/neofs-node#2561. Фlso now any irreparable errors (like invalid net address or TLS handshake) will be returned immediately, not upon reaching the deadline. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
9392e16
to
2844227
Compare
Inspired by nspcc-dev/neofs-node#2561. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Since 2b89b7e, RPC client used `grpc.WithBlock` option to dial the server. This option make dialer to return either `nil` or `context.DeadlineExceeded` errors, with any connection error resulting in the latter. In particular, TLS handshake failures were shadowed by deadline error. Now `WithReturnConnectionError` option is used instead: * it still blocks similar to `WithBlock`; * it adds connection failure to the deadline error. As a result, TLS unit test passes now. This should fix the problem originally posted in nspcc-dev/neofs-node#2561. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Previously, RPC client unconditionally blocked by context passed into `WithContext` (e.g. for 15s). In particular, it definitely stuck on non-temporary error encounter. An example of such errors could be an incorrect network address or connection refusal. Now client instantly fails with any irreparable error in which it is pointless to wait for a change in the connection state. This is achieved with `grpcstd.FailOnNonTempDialError(true)` option. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2844227
to
e99341f
Compare
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.
Have you found what exact reason of behavior changes is? It is just WithBlock
? We did not use it in v0.32.0 but used in 0.33.0?
yes it is. Unit test emulates problem behavior. Explained in the commit |
Fix came from nspcc-dev/neofs-api-go#445 for the problem described in nspcc-dev/neofs-node#2561. Фlso now any irreparable errors (like invalid net address or TLS handshake) will be returned immediately, not upon reaching the deadline. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Fix came from nspcc-dev/neofs-api-go#445 for the problem described in nspcc-dev/neofs-node#2561. Also now any irreparable errors (like invalid net address or TLS handshake) will be returned immediately, not upon reaching the deadline. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
No description provided.