[jboss-jira] [JBoss JIRA] (WFWIP-308) MP Fault Tolerance - unexpected behaviour @Fallback method calls with @Bulkhead

Ondrej Kotek (Jira) issues at jboss.org
Wed Feb 26 10:56:06 EST 2020


Ondrej Kotek created WFWIP-308:
----------------------------------

             Summary: MP Fault Tolerance - unexpected behaviour @Fallback method calls with @Bulkhead
                 Key: WFWIP-308
                 URL: https://issues.redhat.com/browse/WFWIP-308
             Project: WildFly WIP
          Issue Type: Bug
          Components: MP Fault Tolerance
            Reporter: Ondrej Kotek
            Assignee: Radoslav Husar


MP FT does behave correctly in case when there is {{@Bulkhead}}, {{@Timeout}} and {{@Fallback}} and {{@Asynchronous}} on service method. Some of requests do not go to fallback method but end with {{InterruptedException}}.

Test scenario:

- Deploy MP FT service with:
{noformat}
    @Asynchronous
    @Bulkhead(value = 15, waitingTaskQueue = 15)
    @Timeout(value = 1000)
    @Fallback(fallbackMethod = "processFallback")
    public CompletionStage<MyConnection> bulkheadTimeout(boolean fail) throws InterruptedException {
        if (fail) {
            Thread.sleep(2000);
        }
        return CompletableFuture.completedFuture(new MyConnection() {
            @Override
            public String getData() {
                return "Hello from @Bulkhead @Timeout method";
            }
        });
    }

    private CompletionStage<MyConnection> processFallback(boolean fail) {
        return CompletableFuture.completedFuture(new MyConnection() {
            @Override
            public String getData() {
                return "Fallback Hello";
            }
        });
    }
{noformat}
- Send 10+ parallel requests with fail == true

Expected result:
All requests should go to fallback.

Actual Result:
Random number of requests (close to the number of requests) go to fallback.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list