-
Bug
-
Resolution: Done
-
Blocker
-
None
MP FT does not behave correctly in case when there is @CircuitBreaker, @Fallback, @Retry and @Asynchronous on service method. @CircuitBreaker does not get opened based on its configuration and @Fallback method is called with incorrect value.
Test scenario:
- Deploy MP FT service with:
@Asynchronous @Retry(retryOn = IOException.class) @CircuitBreaker(failOn = IOException.class, requestVolumeThreshold = 5, successThreshold = 3, delay = 2, delayUnit = ChronoUnit.SECONDS, failureRatio = 0.75) @Fallback(fallbackMethod = "processFallback") public CompletionStage<MyConnection> retryCircuitBreaker(int counter) throws IOException { System.out.println("retryCircuitBreaker - called - " + counter); if (counter % 4 != 0) { // 3/4 requests trigger IOException System.out.println("retryCircuitBreaker - called - " + counter + " throwing exception"); throw new IOException("Simulated IOException"); } System.out.println("retryCircuitBreaker - called - " + counter + " success"); return CompletableFuture.completedFuture(new MyConnection() { @Override public String getData() { return "Hello from @Retry @CircuitBreaker method" + counter; } }); } private CompletionStage<MyConnection> processFallback(int counter) { System.out.println("processFallback - returned url counter: " + counter); return CompletableFuture.completedFuture(new MyConnection() { @Override public String getData() { return "Fallback Hello" + counter; } }); }
- Sends 16 parallel requests. Every 4th requests pass (including 0th one as there is modulo 4), and 12 invocations fail on IOException.
- Try on more request and check that @Fallback method was called as circuit is open
Expected result:
Circuit gets opened and @Fallback method is called.
Actual Result:
Circuit is not opened and @Fallback method is called.
- is incorporated by
-
JBEAP-18872 Upgrade smallrye-fault-tolerance to 4.1.1 and MP fault-tolerance API to 2.1
- Closed
-
WFLY-13190 Upgrade smallrye-fault-tolerance to 4.1.1
- Closed