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)