-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bulkhead - not working as expected #596
Comments
Is that the full yaml file? The prefix |
You are using a semaphore-based Bulkhead. Yes, it's normal that all threads are waiting until |
Thanks Rob, please find the yaml config as below which am using, I was hoping that the exception would be thrown but that's not happening. resilience4j.bulkhead: |
I can't reproduce it in our Spring Boot 2 demo. I added locally a
I invoked the endpoint
When I add a fallback ->
|
really appreciate your time Rob ! I will test it shortly and update you. |
Thanks, am able to produce it, just thought to share my observation as I see some scope of improvement: b. I used Postman Collection runner to send couple of concurrent request, in this case all the request went into the blocking mode and eventually got completed after Thread.sleep time was over. c. If I initiate the request sequentially one after another (there is some lag time in switching) I get the desired results. |
Can you provide a GitHub repo where you reproduced it? |
How do you run concurrent requests in the Postman Collection Runner? |
Thanks Rob, I will test it tonight with another Rest Client. |
Wrote a custom Python Script and tested using the trusted SOAPUI and it works as expected. |
I'm actually seeing what I think is the same behavior with @bulkhead(name = "BACKEND", fallbackMethod = "fallback", type = Bulkhead.Type.THREADPOOL) where the fallback is completely ignored. However if I switch the type to Bulkhead.Type.SEMAPHORE everything works as I expected it should by calling the fallback method. |
Its fixed in the next version. Hopefully released tomorrow |
Ok great! I will test once it is released. |
v.1.3.0 has been released. Maven Central Sync might take some time. |
Didn't notice this before but it looks like both 1.2.0 and 1.3.0 still use a couple of the 1.1.0 modules...which now produces a boot startup error with 1.3.0
|
The Spring Boot 2 demo works fine. Sure it's not an issue in your build script? Which dependencies do you use? |
I don't think so because the only import I have in my pom is resilience4j-spring-boot2...maven is bringing in everything else. Otherwise I have removed all application config except annotations...but I'm checking
|
Once I added the following dependencies to override what is coming in by default it starts up fine...see below. However, I'm still seeing the same behavior I commented on yesterday where the fallback method of @bulkhead doesn't fire when type = Bulkhead.Type.THREADPOOL and a io.github.resilience4j.bulkhead.BulkheadFullException exception is instead thrown back to the client. I was expecting to be able to catch and handle this situation myself in the fallback method.
|
Can you show me how your code looks like? |
Ok I had to sanitize things a bit but this is what I'm doing...I am expecting to see the exception get logged and not make is back to the caller.
|
I investigate it tomorrow in more depth. I come back to you. Maybe it's an issue in the BulkheadAspect error handling. If you also use add a CircuitBreaker (like in the demo) and add your fallback method there, it should definitely work. |
Yes, it definitely works when I add the @CIRCUITBREAKER |
Hi @cgarman1 <dependencies>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId>
<version>1.3.0</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> But currently we cannot exclude specific dependencies from dependencyManagement. Please see https://issues.apache.org/jira/browse/MNG-5600. |
The issue is in the BulkheadAspect.
In the case your method returns a The ThreadPoolBulkhead is different, because it does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException.
The BulkheadAspect can rethrow the BulkheadFullException or convert it to a failed future? What do you think a user expects? If no fallback method is configured, does a user expect a failed future or a RuntimeException when using the Bulkhead annotation? I prefer to return a failed future. |
…kheadFullException occurs #847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected.
Problem is fixed in 1.4.0-SNAPSHOT. |
Ah ok...yeah I missed that...yes that is exactly what I did/have |
So if no fallback is configured, to me the existing behavior is fine. However if I have a fallback method configured, I expect it to be called (instead of throwing BulkheadFullException) and let me decide what to do. Basically my use case if that I'm retrofitting an existing aggregation service and want to add this functionality without impacting multiple layers of the application with additional try/catch logic. I'm wanting to provide some process isolation via separate thread pool (via @bulkhead) and in the case that it is full, I want to be able to dummy out a response for my downstream service call and return what data I did get from the other service calls back to my client (that is what I am using the fallback method for...i'm creating my own future there). To me the annotation should not make any assumptions about what to return...it should just see that since there was a fallback method configured I will call that method and let the developer determine what gets returned from there. |
The existing Bulkhead Aspect behavior has been fixed to match the behavior of the CircuitBreaker, Retry and RateLimiter Aspects. That means if on don't have a fallback method the CompletableFuture which is returned will be completed exceptionally with a BulkheadFullException. |
1.3.1 has been released. |
Yes, that works as I expected. However one question...I assume that configuring fallback on @bulkhead that itself does not throw another error will cause @CIRCUITBREAKER to never get called, correct? |
Yes, the aspects decorate your method like an onion and have a preconfigured order. But can change the order application-wide. Request -> Retry -> CircuitBreaker -> RateLimiter -> TimeLimiter -> Bulkhead -> method. Exceptions propagate from right to left. Every decorator (proxy) has the possibility to recover from an exception (fallback). In your case you should add the fallback method to the CircuitBreaker. At least if you don't use Retry, but only CircuitBreaker, TimeLimiter and ThreadPoolBulkhead. |
Yeah ok that's what I thought |
…d when a BulkheadFullException occurs resilience4j#847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected.
…d when a BulkheadFullException occurs resilience4j#847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected.
…d when a BulkheadFullException occurs resilience4j#847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected.
* Super early draft of adaptive bulkhead. !!! NOT TESTED !!! * Small proof of concept test. * Code cleanup. Builder for BulkheadAdaptationConfig * Small code clean up. Metrics implementation. Additional TODOs * Additional TODOs * Small renaming * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * Sonar fixes * reduce code duplication * add exception predicate unit testing * first round of updates after introducing sliding window with AIMD limiter * Sonar fixes * Sonar fixes * first round of updates for making adaptive policy independent from bulkhead * first round of applying the review comments * first round of applying the review comments * second round of applying the review comments * Third round of applying the review comments * fix javadoc * sonar fixes * review comments round 4 * code cleanup * review comments round 5 * review comments round 5 * review comments round 5 * #review comments * Sonar fixes * increase test coverage * first round of review comments apply * first round of review comments apply * fix compile issue * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead Draft * Adaptive Bulkhead 2 Draft (#1306) * Remove AIMD leftovers (#1397) * Issue#651: Support to exclude MetricsAutoConfiguration * Propagate clock into CircuitBreakerMetrics to allow mocked time-based tests. (#844) * Issue #596: The Spring Boot fallback method is not invoked when a BulkheadFullException occurs #847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected. * Added timelimiter support for resilience4j-ratpack (#865) * Sonar critical issues solved: (#876) * Remove usage of generic wildcard type. * Define a constant instead of duplicating this literal * Refactor this method to reduce its Cognitive Complexity * Add a nested comment explaining why this method is empty * Class names should not shadow interfaces or superclasses Warnings removed. * Updated Gradle, Migrated from Bintray to Sonatype, migrated to GitHub Actions Co-authored-by: Robert Winkler <rwinkler@telekom.de> * Fixed sonar smells * Small proof of concept test. * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * first round of applying the review comments * Sonar fixes * first round of review comments apply * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead 2 Draft (#1306) * Remove AIMD leftovers (#1397) * updated to master --------- Co-authored-by: bstorozhuk <storozhuk.b.m@gmail.com> Co-authored-by: Mahmoud Romeh <mahmoud.romeh@collibra.com> Co-authored-by: Robert Winkler <rwinkler@telekom.de> Co-authored-by: KrnSaurabh <39181662+KrnSaurabh@users.noreply.github.com> Co-authored-by: Robert Winkler <robwin@t-online.de> Co-authored-by: Dan Maas <daniel.maas@target.com>
* Super early draft of adaptive bulkhead. !!! NOT TESTED !!! * Small proof of concept test. * Code cleanup. Builder for BulkheadAdaptationConfig * Small code clean up. Metrics implementation. Additional TODOs * Additional TODOs * Small renaming * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * Sonar fixes * reduce code duplication * add exception predicate unit testing * first round of updates after introducing sliding window with AIMD limiter * Sonar fixes * Sonar fixes * first round of updates for making adaptive policy independent from bulkhead * first round of applying the review comments * first round of applying the review comments * second round of applying the review comments * Third round of applying the review comments * fix javadoc * sonar fixes * review comments round 4 * code cleanup * review comments round 5 * review comments round 5 * review comments round 5 * #review comments * Sonar fixes * increase test coverage * first round of review comments apply * first round of review comments apply * fix compile issue * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead Draft * Adaptive Bulkhead 2 Draft (resilience4j#1306) * Remove AIMD leftovers (resilience4j#1397) * Issue#651: Support to exclude MetricsAutoConfiguration * Propagate clock into CircuitBreakerMetrics to allow mocked time-based tests. (resilience4j#844) * Issue resilience4j#596: The Spring Boot fallback method is not invoked when a BulkheadFullException occurs resilience4j#847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected. * Added timelimiter support for resilience4j-ratpack (resilience4j#865) * Sonar critical issues solved: (resilience4j#876) * Remove usage of generic wildcard type. * Define a constant instead of duplicating this literal * Refactor this method to reduce its Cognitive Complexity * Add a nested comment explaining why this method is empty * Class names should not shadow interfaces or superclasses Warnings removed. * Updated Gradle, Migrated from Bintray to Sonatype, migrated to GitHub Actions Co-authored-by: Robert Winkler <rwinkler@telekom.de> * Fixed sonar smells * Small proof of concept test. * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * first round of applying the review comments * Sonar fixes * first round of review comments apply * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead 2 Draft (resilience4j#1306) * Remove AIMD leftovers (resilience4j#1397) * updated to master --------- Co-authored-by: bstorozhuk <storozhuk.b.m@gmail.com> Co-authored-by: Mahmoud Romeh <mahmoud.romeh@collibra.com> Co-authored-by: Robert Winkler <rwinkler@telekom.de> Co-authored-by: KrnSaurabh <39181662+KrnSaurabh@users.noreply.github.com> Co-authored-by: Robert Winkler <robwin@t-online.de> Co-authored-by: Dan Maas <daniel.maas@target.com>
* Super early draft of adaptive bulkhead. !!! NOT TESTED !!! * Small proof of concept test. * Code cleanup. Builder for BulkheadAdaptationConfig * Small code clean up. Metrics implementation. Additional TODOs * Additional TODOs * Small renaming * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * Sonar fixes * reduce code duplication * add exception predicate unit testing * first round of updates after introducing sliding window with AIMD limiter * Sonar fixes * Sonar fixes * first round of updates for making adaptive policy independent from bulkhead * first round of applying the review comments * first round of applying the review comments * second round of applying the review comments * Third round of applying the review comments * fix javadoc * sonar fixes * review comments round 4 * code cleanup * review comments round 5 * review comments round 5 * review comments round 5 * #review comments * Sonar fixes * increase test coverage * first round of review comments apply * first round of review comments apply * fix compile issue * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead Draft * Adaptive Bulkhead 2 Draft (resilience4j#1306) * Remove AIMD leftovers (resilience4j#1397) * Issue#651: Support to exclude MetricsAutoConfiguration * Propagate clock into CircuitBreakerMetrics to allow mocked time-based tests. (resilience4j#844) * Issue resilience4j#596: The Spring Boot fallback method is not invoked when a BulkheadFullException occurs resilience4j#847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected. * Added timelimiter support for resilience4j-ratpack (resilience4j#865) * Sonar critical issues solved: (resilience4j#876) * Remove usage of generic wildcard type. * Define a constant instead of duplicating this literal * Refactor this method to reduce its Cognitive Complexity * Add a nested comment explaining why this method is empty * Class names should not shadow interfaces or superclasses Warnings removed. * Updated Gradle, Migrated from Bintray to Sonatype, migrated to GitHub Actions Co-authored-by: Robert Winkler <rwinkler@telekom.de> * Fixed sonar smells * Small proof of concept test. * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * first round of applying the review comments * Sonar fixes * first round of review comments apply * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead 2 Draft (resilience4j#1306) * Remove AIMD leftovers (resilience4j#1397) * updated to master --------- Co-authored-by: bstorozhuk <storozhuk.b.m@gmail.com> Co-authored-by: Mahmoud Romeh <mahmoud.romeh@collibra.com> Co-authored-by: Robert Winkler <rwinkler@telekom.de> Co-authored-by: KrnSaurabh <39181662+KrnSaurabh@users.noreply.github.com> Co-authored-by: Robert Winkler <robwin@t-online.de> Co-authored-by: Dan Maas <daniel.maas@target.com>
* Super early draft of adaptive bulkhead. !!! NOT TESTED !!! * Small proof of concept test. * Code cleanup. Builder for BulkheadAdaptationConfig * Small code clean up. Metrics implementation. Additional TODOs * Additional TODOs * Small renaming * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * Sonar fixes * reduce code duplication * add exception predicate unit testing * first round of updates after introducing sliding window with AIMD limiter * Sonar fixes * Sonar fixes * first round of updates for making adaptive policy independent from bulkhead * first round of applying the review comments * first round of applying the review comments * second round of applying the review comments * Third round of applying the review comments * fix javadoc * sonar fixes * review comments round 4 * code cleanup * review comments round 5 * review comments round 5 * review comments round 5 * #review comments * Sonar fixes * increase test coverage * first round of review comments apply * first round of review comments apply * fix compile issue * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead Draft * Adaptive Bulkhead 2 Draft (resilience4j#1306) * Remove AIMD leftovers (resilience4j#1397) * Issue#651: Support to exclude MetricsAutoConfiguration * Propagate clock into CircuitBreakerMetrics to allow mocked time-based tests. (resilience4j#844) * Issue resilience4j#596: The Spring Boot fallback method is not invoked when a BulkheadFullException occurs resilience4j#847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected. * Added timelimiter support for resilience4j-ratpack (resilience4j#865) * Sonar critical issues solved: (resilience4j#876) * Remove usage of generic wildcard type. * Define a constant instead of duplicating this literal * Refactor this method to reduce its Cognitive Complexity * Add a nested comment explaining why this method is empty * Class names should not shadow interfaces or superclasses Warnings removed. * Updated Gradle, Migrated from Bintray to Sonatype, migrated to GitHub Actions Co-authored-by: Robert Winkler <rwinkler@telekom.de> * Fixed sonar smells * Small proof of concept test. * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * first round of applying the review comments * Sonar fixes * first round of review comments apply * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead 2 Draft (resilience4j#1306) * Remove AIMD leftovers (resilience4j#1397) * updated to master --------- Co-authored-by: bstorozhuk <storozhuk.b.m@gmail.com> Co-authored-by: Mahmoud Romeh <mahmoud.romeh@collibra.com> Co-authored-by: Robert Winkler <rwinkler@telekom.de> Co-authored-by: KrnSaurabh <39181662+KrnSaurabh@users.noreply.github.com> Co-authored-by: Robert Winkler <robwin@t-online.de> Co-authored-by: Dan Maas <daniel.maas@target.com>
* Super early draft of adaptive bulkhead. !!! NOT TESTED !!! * Small proof of concept test. * Code cleanup. Builder for BulkheadAdaptationConfig * Small code clean up. Metrics implementation. Additional TODOs * Additional TODOs * Small renaming * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * Sonar fixes * reduce code duplication * add exception predicate unit testing * first round of updates after introducing sliding window with AIMD limiter * Sonar fixes * Sonar fixes * first round of updates for making adaptive policy independent from bulkhead * first round of applying the review comments * first round of applying the review comments * second round of applying the review comments * Third round of applying the review comments * fix javadoc * sonar fixes * review comments round 4 * code cleanup * review comments round 5 * review comments round 5 * review comments round 5 * #review comments * Sonar fixes * increase test coverage * first round of review comments apply * first round of review comments apply * fix compile issue * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead Draft * Adaptive Bulkhead 2 Draft (resilience4j#1306) * Remove AIMD leftovers (resilience4j#1397) * Issue#651: Support to exclude MetricsAutoConfiguration * Propagate clock into CircuitBreakerMetrics to allow mocked time-based tests. (resilience4j#844) * Issue resilience4j#596: The Spring Boot fallback method is not invoked when a BulkheadFullException occurs resilience4j#847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected. * Added timelimiter support for resilience4j-ratpack (resilience4j#865) * Sonar critical issues solved: (resilience4j#876) * Remove usage of generic wildcard type. * Define a constant instead of duplicating this literal * Refactor this method to reduce its Cognitive Complexity * Add a nested comment explaining why this method is empty * Class names should not shadow interfaces or superclasses Warnings removed. * Updated Gradle, Migrated from Bintray to Sonatype, migrated to GitHub Actions Co-authored-by: Robert Winkler <rwinkler@telekom.de> * Fixed sonar smells * Small proof of concept test. * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * first round of applying the review comments * Sonar fixes * first round of review comments apply * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead 2 Draft (resilience4j#1306) * Remove AIMD leftovers (resilience4j#1397) * updated to master --------- Co-authored-by: bstorozhuk <storozhuk.b.m@gmail.com> Co-authored-by: Mahmoud Romeh <mahmoud.romeh@collibra.com> Co-authored-by: Robert Winkler <rwinkler@telekom.de> Co-authored-by: KrnSaurabh <39181662+KrnSaurabh@users.noreply.github.com> Co-authored-by: Robert Winkler <robwin@t-online.de> Co-authored-by: Dan Maas <daniel.maas@target.com>
* Issue #201 duplication removed from PredicateCreator clients (#1921) * Move toString() out of the builder class (#1913) Co-authored-by: Mike Dias <mdias@atlassian.com> * docs: remove deprecated http client (#1930) Co-authored-by: hongbin-deali <hongbin.kim@deali.net> * configuration for native image added (#1883) Co-authored-by: Andreas Mautsch <amautsch> * Bump actions/checkout from 3.2.0 to 3.4.0 (#1911) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.4.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3.2.0...v3.4.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/cache from 3.0.11 to 3.3.1 (#1907) Bumps [actions/cache](https://github.com/actions/cache) from 3.0.11 to 3.3.1. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3.0.11...v3.3.1) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Issue #1875: add copyright information to jar (#1876) * add copyright information to jar * add license file to jar --------- Co-authored-by: TWI <audi-connect@msg.group> * Add missing validation of config fields (#1931) * Add missing validation of config fields Document existing assumptions * Fix range in exception message * Mentioned removed deprecated properties in v2.0.0 changelog (#1954) Co-authored-by: Łukasz Nowak <lukasz.nowak@idemia.com> * Adding unchecked() method to CheckedConsumer (#1981) Co-authored-by: Muhammad Sohail <muhammad.sohail@autodesk.com> * FallbackMethod supports AOP (#1965) * Add AOP in FallbackMethod * Add test --------- Co-authored-by: 임수현 <soohyun.lim2@cj.net> * Prepare release 2.1.0 * Prepare release 2.1.0 * Updated version to 2.2.0-SNAPSHOT * Issue #1761: Async retry doesn't emit event bugfix (#1986) Co-authored-by: Hrbacek, David <david.hrbacek@firma.seznam.cz> * Issue #1600: Metric for total number of invoked calls from retry (#1895) * Issue #1600: Metric for total number of invoked calls from retry * Issue #1600: Metric for total number of invoked calls from retry. Update * Issue #1600: Metric for total number of invoked calls from retry. Update * fix Feign fallback from lambda (#1999) * fix Feign fallback from lambda * Provide test cases for pr#1999 * Micrometer Timer decorator (#1989) * Timer reactive support (#2009) * Timer spring support (#2020) * Discussion #1962: Added apache commons configuration based registries bootstraping (#1991) * Removing stale retry configurations from configuration map #2037 (#2039) * Bump org.jetbrains.kotlin.jvm from 1.7.22 to 1.9.0 (#1990) Bumps [org.jetbrains.kotlin.jvm](https://github.com/JetBrains/kotlin) from 1.7.22 to 1.9.0. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.7.22...v1.9.0) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin.jvm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixed Issue #2040: Micronaut BulkheadInterceptor always uses the "default" configuration in micronaut application * Support Micronaut 4 (#1951) * FallbackMethod supports AOP (#2058) * Add AOP in FallbackMethod * Add test * Fixed the fallback method bug --------- Co-authored-by: 임수현 <soohyun.lim2@cj.net> * Support class name using SpEL expression at Circuitbreaker annotation name field. (#2053) * Issue #1565: Do not retry if IntervalFunction returns interval less than 0. Emit correct events based on result of IF. (#2067) * Fixed time-based tests * Updated version to 2.2.0 * Do not interrupt future if running (#2072) * Avoid to add duplicate consumer (#2074) * Updated version to 2.3.0-SNAPSHOT * Improved EventProcessorTest * Fix bug in Retry AsyncContext's onResult consumeResultBaeforeRetryAttempt (#2035) * Adaptive bulkhead 2023.1.4 (#1873) * Super early draft of adaptive bulkhead. !!! NOT TESTED !!! * Small proof of concept test. * Code cleanup. Builder for BulkheadAdaptationConfig * Small code clean up. Metrics implementation. Additional TODOs * Additional TODOs * Small renaming * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * adaptive bulkhead refactoring to match last discussion * Sonar fixes * reduce code duplication * add exception predicate unit testing * first round of updates after introducing sliding window with AIMD limiter * Sonar fixes * Sonar fixes * first round of updates for making adaptive policy independent from bulkhead * first round of applying the review comments * first round of applying the review comments * second round of applying the review comments * Third round of applying the review comments * fix javadoc * sonar fixes * review comments round 4 * code cleanup * review comments round 5 * review comments round 5 * review comments round 5 * #review comments * Sonar fixes * increase test coverage * first round of review comments apply * first round of review comments apply * fix compile issue * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead Draft * Adaptive Bulkhead 2 Draft (#1306) * Remove AIMD leftovers (#1397) * Issue#651: Support to exclude MetricsAutoConfiguration * Propagate clock into CircuitBreakerMetrics to allow mocked time-based tests. (#844) * Issue #596: The Spring Boot fallback method is not invoked when a BulkheadFullException occurs #847 The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect. The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected. * Added timelimiter support for resilience4j-ratpack (#865) * Sonar critical issues solved: (#876) * Remove usage of generic wildcard type. * Define a constant instead of duplicating this literal * Refactor this method to reduce its Cognitive Complexity * Add a nested comment explaining why this method is empty * Class names should not shadow interfaces or superclasses Warnings removed. * Updated Gradle, Migrated from Bintray to Sonatype, migrated to GitHub Actions Co-authored-by: Robert Winkler <rwinkler@telekom.de> * Fixed sonar smells * Small proof of concept test. * first round of adaptive bulkhead updates * second round of adaptive bulkhead updates * Sonar fixes * first round of applying the review comments * Sonar fixes * first round of review comments apply * tune the adaptive bulkhead test * New Draft * Adaptive Bulkhead 2 Draft (#1306) * Remove AIMD leftovers (#1397) * updated to master --------- Co-authored-by: bstorozhuk <storozhuk.b.m@gmail.com> Co-authored-by: Mahmoud Romeh <mahmoud.romeh@collibra.com> Co-authored-by: Robert Winkler <rwinkler@telekom.de> Co-authored-by: KrnSaurabh <39181662+KrnSaurabh@users.noreply.github.com> Co-authored-by: Robert Winkler <robwin@t-online.de> Co-authored-by: Dan Maas <daniel.maas@target.com> * Issue #201 bulkhead events corrected * Issue #201 BulkheadOnLimitIncreasedEvent, BulkheadOnLimitDecreasedEvent merged into one event * Issue #201 adaptive bulkhead config and time fixed * Adaptive bulkhead 4.1 (#1947) * Issue #201 EventPublisher hierarchy fixed * Issue #201 onResult added to AdaptiveBulkhead * Issue #201 states extracted to own files * Issue #201 AdaptiveBulkhead states simplified (#1995) * Issue #201 IncreaseInterval for SlowStartState added (#2001) * Issue #201 timeUnit replaced by currentTimestamp (#2007) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Mike Dias <mike.rodrigues.dias@gmail.com> Co-authored-by: Mike Dias <mdias@atlassian.com> Co-authored-by: Hongbin Kim <fusis1@naver.com> Co-authored-by: hongbin-deali <hongbin.kim@deali.net> Co-authored-by: Andreas Mautsch <amautsch@gmx.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: tobi5775 <50146675+tobi5775@users.noreply.github.com> Co-authored-by: TWI <audi-connect@msg.group> Co-authored-by: Karol Nowak <nowkarol+github@gmail.com> Co-authored-by: Łukasz Nowak <38426907+nluk@users.noreply.github.com> Co-authored-by: Łukasz Nowak <lukasz.nowak@idemia.com> Co-authored-by: Muhammad Sohail <mhsohail56@gmail.com> Co-authored-by: Muhammad Sohail <muhammad.sohail@autodesk.com> Co-authored-by: SOOHYUN-LIM <sh.lim7682@gmail.com> Co-authored-by: 임수현 <soohyun.lim2@cj.net> Co-authored-by: Robert Winkler <rwinkler@telekom.de> Co-authored-by: David Hrbacek <35535320+b923@users.noreply.github.com> Co-authored-by: Hrbacek, David <david.hrbacek@firma.seznam.cz> Co-authored-by: Oleksandr L <laviua@users.noreply.github.com> Co-authored-by: Kerwin Bryant <kerwin612@qq.com> Co-authored-by: Mariusz Kopylec <mariusz.kopylec@o2.pl> Co-authored-by: Mariusz Kopylec <mariusz.kopylec@allegro.pl> Co-authored-by: Deepak Kumar <deep.rnj@gmail.com> Co-authored-by: tanuja5 <1997.tanuja@gmail.com> Co-authored-by: Graeme Rocher <graeme.rocher@gmail.com> Co-authored-by: seokgoon28 <148044191+seokgoon28@users.noreply.github.com> Co-authored-by: jattisha <jovanattisha@yahoo.com> Co-authored-by: Hartigan <hartigans@live.com> Co-authored-by: shijun_deng <dengshijun1992@qq.com> Co-authored-by: mbio <qnwlqnwlxm@naver.com> Co-authored-by: bstorozhuk <storozhuk.b.m@gmail.com> Co-authored-by: Mahmoud Romeh <mahmoud.romeh@collibra.com> Co-authored-by: KrnSaurabh <39181662+KrnSaurabh@users.noreply.github.com> Co-authored-by: Robert Winkler <robwin@t-online.de> Co-authored-by: Dan Maas <daniel.maas@target.com>
Yaml Config:
instances:
defaultInstance:
maxConcurrentCalls: 1
maxWaitDuration: 1ms
Java Code:
Method annotated with :
@bulkhead(name = "defaultInstance",fallbackMethod="fallback_BH")
private String fallback_BH(BulkheadFullException e) {
return "Bulkhead Full - fallback called";
}
Q- I am expecting that rest of the concurrent calls will be directed to fallback method once the limit of 1 call is reached on a method, but that's not happening , the calls are blocked on the method annotated with @bulkhead till it responds back.
Please suggest, if I need to change my implementation.
The text was updated successfully, but these errors were encountered: