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

Make UniRetry & MultiRetry propagate the original Exception (#724) #726

Merged
merged 1 commit into from Oct 13, 2021
Merged

Make UniRetry & MultiRetry propagate the original Exception (#724) #726

merged 1 commit into from Oct 13, 2021

Conversation

oliver-brm
Copy link
Contributor

This changes the behavior of ExponentialBackoff#randomExponentialBackoffFunction so that the original Exception is propagated when the number of retries gets exhausted. An IllegalStateException with the number of retries made is added to the suppressed Exceptions in the original Exception.

@oliver-brm oliver-brm changed the title Make UniRetry & MultiRetry propagate the original Exception Make UniRetry & MultiRetry propagate the original Exception (#724) Oct 12, 2021
@codecov
Copy link

codecov bot commented Oct 12, 2021

Codecov Report

Merging #726 (8a28b71) into main (3a3e8c0) will increase coverage by 0.39%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #726      +/-   ##
============================================
+ Coverage     89.81%   90.20%   +0.39%     
- Complexity     2984     3001      +17     
============================================
  Files           374      374              
  Lines         11789    11790       +1     
  Branches       1478     1480       +2     
============================================
+ Hits          10588    10635      +47     
+ Misses          614      588      -26     
+ Partials        587      567      -20     
Impacted Files Coverage Δ
...io/smallrye/mutiny/helpers/ExponentialBackoff.java 82.14% <100.00%> (+0.32%) ⬆️
...ye/mutiny/helpers/queues/SpscLinkedArrayQueue.java 97.61% <0.00%> (+0.79%) ⬆️
...a/io/smallrye/mutiny/helpers/BlockingIterable.java 89.79% <0.00%> (+1.02%) ⬆️
...mallrye/mutiny/operators/multi/MultiFlatMapOp.java 86.15% <0.00%> (+1.23%) ⬆️
...erators/multi/builders/SerializedMultiEmitter.java 82.27% <0.00%> (+1.26%) ⬆️
...subscription/SwitchableSubscriptionSubscriber.java 99.18% <0.00%> (+1.63%) ⬆️
...y/operators/multi/processors/UnicastProcessor.java 97.41% <0.00%> (+1.72%) ⬆️
...y/operators/multi/builders/IterableBasedMulti.java 84.04% <0.00%> (+2.12%) ⬆️
...mallrye/mutiny/operators/multi/FlatMapManager.java 98.61% <0.00%> (+2.77%) ⬆️
...operators/multi/builders/CollectionBasedMulti.java 96.77% <0.00%> (+3.22%) ⬆️
... and 5 more

Copy link
Contributor

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

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

Thanks!

I like the idea to add the suppressed exception, so we can know the last exception and the number of attempts.

@cescoffier cescoffier merged commit 43a6d66 into smallrye:main Oct 13, 2021
@cescoffier cescoffier added the bug Something isn't working label Oct 13, 2021
@cescoffier cescoffier added this to the 1.2.0 milestone Oct 13, 2021
@cescoffier
Copy link
Contributor

@jponge I set the milestone to 1.2.0, but could be 1.1.2 as it can be seen as a bug fix.

@jponge jponge modified the milestones: 1.2.0, 1.1.2 Oct 13, 2021
@jponge
Copy link
Member

jponge commented Oct 13, 2021

It's actually going to be in 1.1.2 later today since it got merged to main 😉

@jponge
Copy link
Member

jponge commented Oct 13, 2021

(and we haven't done any branch, just doing commits along the way, fine here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants