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: handle recovery failures during stream reframing failure #46

Merged

Conversation

igorbernstein2
Copy link
Contributor

This was discovered while debugging another issue. While deflaking
ReadRowRetryTest, this issue came up preventing me from seeing the
underlying issue.

ReframingResponseObserver#deliverUnsafe() should never fail. However if
does, it will try to cancel the upstream stream and notify the
downstream observer. However canceling the upstream can throw an
exception and prevent the downstram observer from being notified of any
error.

This fix will catch cancellation errors and add them as suppressed
exceptions to the original failure

Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion)

This was discovered while debugging another issue. While deflaking
ReadRowRetryTest, this issue came up preventing me from seeing the
underlying issue.

ReframingResponseObserver#deliverUnsafe() should never fail. However if
does, it will try to cancel the upstream stream and notify the
downstream observer. However canceling the upstream can throw an
exception and prevent the downstram observer from being notified of any
error.

This fix will catch cancellation errors and add them as suppressed
exceptions to the original failure
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 28, 2019
@codecov
Copy link

codecov bot commented Oct 28, 2019

Codecov Report

Merging #46 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #46      +/-   ##
============================================
+ Coverage     81.28%   81.29%   +<.01%     
  Complexity      937      937              
============================================
  Files            95       95              
  Lines          5839     5842       +3     
  Branches        325      325              
============================================
+ Hits           4746     4749       +3     
  Misses          917      917              
  Partials        176      176
Impacted Files Coverage Δ Complexity Δ
...able/gaxx/reframing/ReframingResponseObserver.java 89.28% <100%> (+0.29%) 29 <0> (ø) ⬇️

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 4ca7e2f...d389a01. Read the comment docs.

@igorbernstein2 igorbernstein2 merged commit a16cb88 into googleapis:master Oct 28, 2019
@igorbernstein2 igorbernstein2 deleted the fix-reframing-failure-recovery branch October 28, 2019 19:38
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.

None yet

3 participants