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: Don't re-open streams on 'error' and 'end' #713

Merged
merged 3 commits into from
Jul 8, 2019

Conversation

schmidt-sebastian
Copy link
Contributor

From scrubbing through the logs at firebase/firebase-admin-node#585 it seems like we can get into a weird loop when maybeReopenStream gets called by both the end and error handler, resulting in exponentially increasing calls to backoffAndWait(). This can then cause the backoff handler to error on a single network glitch.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 8, 2019
Copy link

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Jul 8, 2019

Codecov Report

Merging #713 into master will decrease coverage by 0.16%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #713      +/-   ##
==========================================
- Coverage   96.21%   96.05%   -0.17%     
==========================================
  Files          20       20              
  Lines        2220     2228       +8     
  Branches      470      472       +2     
==========================================
+ Hits         2136     2140       +4     
- Misses         20       22       +2     
- Partials       64       66       +2
Impacted Files Coverage Δ
dev/src/backoff.ts 100% <100%> (ø) ⬆️
dev/src/watch.ts 95.98% <87.5%> (-1.59%) ⬇️

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 f604671...b49d87b. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jul 8, 2019

Codecov Report

Merging #713 into master will decrease coverage by 0.16%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #713      +/-   ##
==========================================
- Coverage   96.21%   96.05%   -0.17%     
==========================================
  Files          20       20              
  Lines        2220     2228       +8     
  Branches      470      472       +2     
==========================================
+ Hits         2136     2140       +4     
- Misses         20       22       +2     
- Partials       64       66       +2
Impacted Files Coverage Δ
dev/src/backoff.ts 100% <100%> (ø) ⬆️
dev/src/watch.ts 95.98% <87.5%> (-1.59%) ⬇️

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 f604671...b49d87b. Read the comment docs.

@schmidt-sebastian schmidt-sebastian merged commit 104a965 into master Jul 8, 2019
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/parralelerrors branch January 15, 2020 04:57
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.

3 participants