[JBoss JIRA] (WFWIP-308) MP Fault Tolerance - unexpected behaviour @Fallback method calls with @Bulkhead
by Radoslav Husar (Jira)
[ https://issues.redhat.com/browse/WFWIP-308?page=com.atlassian.jira.plugin... ]
Radoslav Husar commented on WFWIP-308:
--------------------------------------
Opened upstream as https://github.com/smallrye/smallrye-fault-tolerance/issues/198.
> 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
> Priority: Blocker
>
> 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)
5 years
[JBoss JIRA] (WFWIP-307) MP Fault Tolerance - unexpected behaviour @Fallback method calls with @CircuitBreaker
by Radoslav Husar (Jira)
[ https://issues.redhat.com/browse/WFWIP-307?page=com.atlassian.jira.plugin... ]
Radoslav Husar commented on WFWIP-307:
--------------------------------------
Opened upstream as https://github.com/smallrye/smallrye-fault-tolerance/issues/197 to get proper visibility there too.
> MP Fault Tolerance - unexpected behaviour @Fallback method calls with @CircuitBreaker
> -------------------------------------------------------------------------------------
>
> Key: WFWIP-307
> URL: https://issues.redhat.com/browse/WFWIP-307
> Project: WildFly WIP
> Issue Type: Bug
> Components: MP Fault Tolerance
> Reporter: Miroslav Novak
> Assignee: Radoslav Husar
> Priority: Blocker
>
> 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:
> {code}
> @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;
> }
> });
> }
> {code}
> * 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.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
by Ladislav Thon (Jira)
[ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin... ]
Ladislav Thon commented on WFWIP-309:
-------------------------------------
Perhaps it's a consequence of unrelated failures, then. I'm working on fixing the other issues (WFWIP-307 and WFWIP-308) and we'll see if we still get this error after these are fixed.
> MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> --------------------------------------------------------------------------------------------------------------
>
> Key: WFWIP-309
> URL: https://issues.redhat.com/browse/WFWIP-309
> Project: WildFly WIP
> Issue Type: Bug
> Components: MP Fault Tolerance
> Reporter: Miroslav Novak
> Assignee: Radoslav Husar
> Priority: Blocker
>
> There is unexpected error log in following 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:
> This test is currently hitting issue WFWIP-308 however additionally there is error in server log:
> {code}
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) Exception in thread "pool-22-thread-4" Exception in thread "pool-22-thread-2" org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at org.eclipse.microprofile.metrics.MetricRegistry$Proxy$_$$_WeldClientProxy.getHistograms(Unknown Source)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramOf(MetricsCollectorFactory.java:105)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramUpdate(MetricsCollectorFactory.java:86)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.bulkheadQueueLeft(MetricsCollectorFactory.java:125)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.core.bulkhead.CompletionStageBulkhead$CompletionStageBulkheadTask.run(CompletionStageBulkhead.java:78)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.lang.Thread.run(Thread.java:748)
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (DROOLS-1762) kie-maven-plugin: Make use of project dependencies to avoid their declaration inside kie-maven-plugin
by Massimiliano Dessi (Jira)
[ https://issues.redhat.com/browse/DROOLS-1762?page=com.atlassian.jira.plug... ]
Massimiliano Dessi closed DROOLS-1762.
--------------------------------------
Resolution: Won't Fix
> kie-maven-plugin: Make use of project dependencies to avoid their declaration inside kie-maven-plugin
> -----------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1762
> URL: https://issues.redhat.com/browse/DROOLS-1762
> Project: Drools
> Issue Type: Bug
> Components: build
> Reporter: Matej Čimbora
> Assignee: Massimiliano Dessi
> Priority: Major
> Attachments: dinnerparty.zip
>
>
> Suppose I use a guided decision table, which contains a custom Planner RHS IAction (e.g. [ActionSimpleConstraintMatch|https://github.com/kiegroup/optaplanner/blob/...]). The Planner IAction is located in the following module:
> {code:xml}
> <dependency>
> <groupId>org.optaplanner</groupId>
> <artifactId>optaplanner-workbench-models-datamodel-api</artifactId>
> </dependency>
> {code}
> My project depends on the optaplanner-workbench-models-datamodel-api module, so does kie-maven-plugin, see the [link|https://github.com/kiegroup/droolsjbpm-integration/blob/master/kie-m...]. If I remove the dependency from kie-maven-plugin, the build of my project fails with the following error:
> {code:xml}
> [ERROR] Failed to execute goal org.kie:kie-maven-plugin:8.0.0-SNAPSHOT:build (default-build) on project dinnerparty: Execution default-build of goal org.kie:kie-maven-plugin:8.0.0-SNAPSHOT:build failed:
> [ERROR] ---- Debugging information ----
> [ERROR] cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
> [ERROR] cause-message : org.optaplanner.workbench.models.datamodel.rule.ActionSimpleConstraintMatch
> [ERROR] class : java.util.ArrayList
> [ERROR] required-type : java.util.ArrayList
> [ERROR] converter-type : com.thoughtworks.xstream.converters.collections.CollectionConverter
> [ERROR] path : /decision-table52/actionCols/org.drools.workbench.models.guided.dtable.shared.model.BRLActionColumn/definition/org.optaplanner.workbench.models.datamodel.rule.ActionSimpleConstraintMatch
> [ERROR] class[1] : org.drools.workbench.models.guided.dtable.shared.model.BRLActionColumn
> [ERROR] converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
> [ERROR] class[2] : org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52
> [ERROR] version : 1.4.10
> [ERROR] -------------------------------
> {code}
> I tried to load the org.optaplanner.workbench.models.datamodel.rule.ActionSimpleConstraintMatch class inside org.drools.workbench.models.guided.dtable.backend.GuidedDTXMLPersistence using getClass().getClassLoader().loadClass("org.optaplanner.workbench.models.datamodel.rule.ActionSimpleConstraintMatch"), leading to ClassNotFoundException.
> Expected behavior:
> Be able to use external classes in a kie project without the need to declare them directly in kie-maven-plugin. It should be enough to declare those dependencies in the project that I'm building.
> Attaching a reproducer (dinnerparty.zip). Should build fine out of the box. Now try to make a local build of kie-maven-plugin with org.optaplanner:optaplanner-workbench-models-datamodel-api dependency removed. Build dinnerparty project again, the issue described above should pop up.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
by Radoslav Husar (Jira)
[ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin... ]
Radoslav Husar commented on WFWIP-309:
--------------------------------------
This is most likely an integration issue and I am working on a fix. However, the spec goes on to define what scope needs to be active, see:
{quoteThe context for RequestScoped must be active during the asynchronous method invocation.{quote}
The spec doesn't require application scope to be active.
> MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> --------------------------------------------------------------------------------------------------------------
>
> Key: WFWIP-309
> URL: https://issues.redhat.com/browse/WFWIP-309
> Project: WildFly WIP
> Issue Type: Bug
> Components: MP Fault Tolerance
> Reporter: Miroslav Novak
> Assignee: Radoslav Husar
> Priority: Blocker
>
> There is unexpected error log in following 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:
> This test is currently hitting issue WFWIP-308 however additionally there is error in server log:
> {code}
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) Exception in thread "pool-22-thread-4" Exception in thread "pool-22-thread-2" org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at org.eclipse.microprofile.metrics.MetricRegistry$Proxy$_$$_WeldClientProxy.getHistograms(Unknown Source)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramOf(MetricsCollectorFactory.java:105)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramUpdate(MetricsCollectorFactory.java:86)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.bulkheadQueueLeft(MetricsCollectorFactory.java:125)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.core.bulkhead.CompletionStageBulkhead$CompletionStageBulkheadTask.run(CompletionStageBulkhead.java:78)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.lang.Thread.run(Thread.java:748)
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
by Radoslav Husar (Jira)
[ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin... ]
Radoslav Husar edited comment on WFWIP-309 at 2/27/20 4:12 AM:
---------------------------------------------------------------
This is most likely an integration issue and I am working on a fix. However, the spec goes on to define what scope needs to be active, see:
{quote}The context for RequestScoped must be active during the asynchronous method invocation.{quote}
The spec doesn't require application scope to be active.
was (Author: rhusar):
This is most likely an integration issue and I am working on a fix. However, the spec goes on to define what scope needs to be active, see:
{quoteThe context for RequestScoped must be active during the asynchronous method invocation.{quote}
The spec doesn't require application scope to be active.
> MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> --------------------------------------------------------------------------------------------------------------
>
> Key: WFWIP-309
> URL: https://issues.redhat.com/browse/WFWIP-309
> Project: WildFly WIP
> Issue Type: Bug
> Components: MP Fault Tolerance
> Reporter: Miroslav Novak
> Assignee: Radoslav Husar
> Priority: Blocker
>
> There is unexpected error log in following 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:
> This test is currently hitting issue WFWIP-308 however additionally there is error in server log:
> {code}
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) Exception in thread "pool-22-thread-4" Exception in thread "pool-22-thread-2" org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at org.eclipse.microprofile.metrics.MetricRegistry$Proxy$_$$_WeldClientProxy.getHistograms(Unknown Source)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramOf(MetricsCollectorFactory.java:105)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramUpdate(MetricsCollectorFactory.java:86)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.bulkheadQueueLeft(MetricsCollectorFactory.java:125)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at io.smallrye.faulttolerance.core.bulkhead.CompletionStageBulkhead$CompletionStageBulkheadTask.run(CompletionStageBulkhead.java:78)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) at java.lang.Thread.run(Thread.java:748)
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years