spotify / async-google-pubsub-client

[SUNSET] Async Google Pubsub Client
Apache License 2.0
158 stars 40 forks source link

decrement outstanding message count on Error, reraise #43

Closed pdeglopper closed 6 years ago

pdeglopper commented 6 years ago

Not everything that can go wrong is an Exception instance - we ran into StackOverflowError's coming out of a Cassandra driver, just for instance, and these led to a leak in the outstandingMessages count that eventually stopped all pulling.

codecov[bot] commented 6 years ago

Codecov Report

Merging #43 into master will decrease coverage by 0.25%. The diff coverage is 40%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #43      +/-   ##
============================================
- Coverage      76.1%   75.85%   -0.26%     
  Complexity      191      191              
============================================
  Files            26       26              
  Lines           904      907       +3     
  Branches         59       59              
============================================
  Hits            688      688              
- Misses          183      186       +3     
  Partials         33       33
Impacted Files Coverage Δ Complexity Δ
...com/spotify/google/cloud/pubsub/client/Puller.java 79.66% <40%> (-2.08%) 20 <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 ea504b0...f7c6c07. Read the comment docs.

pdeglopper commented 6 years ago

Updated to make sure it decrements by the full batch size even when exiting the for loop early due to rethrowing an Error.

danielnorberg commented 6 years ago

Addressed by https://github.com/spotify/async-google-pubsub-client/pull/44