[JBoss JIRA] (WFWIP-234) oc scale wildflyserver throws Permissions error with regular user
by Jeff Mesnil (Jira)
[ https://issues.jboss.org/browse/WFWIP-234?page=com.atlassian.jira.plugin.... ]
Jeff Mesnil updated WFWIP-234:
------------------------------
Workaround Description: Do no use the oc scale operation but edit the WildFlyServer resource instead.
Workaround: Workaround Exists
> oc scale wildflyserver throws Permissions error with regular user
> -----------------------------------------------------------------
>
> Key: WFWIP-234
> URL: https://issues.jboss.org/browse/WFWIP-234
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Petr Kremensky
> Assignee: Jeff Mesnil
> Priority: Critical
> Labels: operator
>
> Trying to use {{oc scale}} command using a regular users (non-admin) fails with permissions error:
> {code}
> oc scale --replicas=2 wildflyserver quickstart
> Error from server (Forbidden): wildflyservers.wildfly.org "quickstart" is forbidden: User "developer" cannot get resource "wildflyservers/scale" in API group "wildfly.org" in the namespace "eap-operator"
> {code}
> thou I'm able to change the wildflyserver (edit number of replicas in yaml) resource via web console without trouble.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFWIP-237) Wildfly operator scale down stuck with wildfly18 image
by Jeff Mesnil (Jira)
[ https://issues.jboss.org/browse/WFWIP-237?page=com.atlassian.jira.plugin.... ]
Jeff Mesnil commented on WFWIP-237:
-----------------------------------
[~ochaloup]I don't think so, I can still reproduce the issue as explained in https://github.com/wildfly/wildfly-operator/issues/111 even after #113)
> Wildfly operator scale down stuck with wildfly18 image
> ------------------------------------------------------
>
> Key: WFWIP-237
> URL: https://issues.jboss.org/browse/WFWIP-237
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Petr Kremensky
> Assignee: Jeff Mesnil
> Priority: Critical
> Labels: operator
> Attachments: logs.txt
>
>
> *quay.io/wildfly/wildfly-centos7:17.0*
> {noformat}
> $ docker run -ti quay.io/wildfly/wildfly-centos7:17.0 /bin/bash
> [jboss@1cc52cbad596 ~]$ echo $JBOSS_HOME
> /opt/jboss/wildfly
> [jboss@1cc52cbad596 ~]$ ll /opt/wildfly
> ls: cannot access /opt/wildfly: No such file or directory
> [jboss@1cc52cbad596 ~]$ ll /opt/jboss/wildfly
> total 540
> -rw-rw-r--. 1 jboss root 26530 Jun 11 12:46 LICENSE.txt
> -rw-rw-r--. 1 jboss root 2221 Jun 11 12:46 README.txt
> drwxrwxr-x. 3 jboss root 4096 Jun 11 12:46 appclient
> drwxrwxr-x. 4 jboss root 4096 Jun 11 12:46 bin
> -rw-rw-r--. 1 jboss root 2451 Jun 11 12:46 copyright.txt
> drwxrwxr-x. 6 jboss root 4096 Jun 11 12:46 docs
> -rw-rw-r--. 1 jboss root 489207 Jun 11 12:46 jboss-modules.jar
> drwxrwxr-x. 5 jboss root 4096 Jun 11 12:46 modules
> drwxrwxr-x. 5 jboss root 4096 Jun 11 12:46 standalone
> drwxrwxr-x. 2 jboss root 4096 Jun 11 12:46 welcome-content
> {noformat}
> *quay.io/wildfly/wildfly-centos7:18.0*
> {noformat}
> $ docker run -ti quay.io/wildfly/wildfly-centos7:18.0 /bin/bash
> [jboss@8a0a5cd2e76a ~]$ echo $JBOSS_HOME
> /opt/wildfly
> [jboss@8a0a5cd2e76a ~]$ ll /opt/wildfly
> total 540
> -rw-rw-r--. 1 jboss root 26530 Oct 4 09:15 LICENSE.txt
> -rw-rw-r--. 1 jboss root 2224 Oct 4 09:15 README.txt
> drwxrwxr-x. 3 jboss root 4096 Oct 4 09:15 appclient
> drwxrwxr-x. 4 jboss root 4096 Oct 4 09:15 bin
> -rw-rw-r--. 1 jboss root 2451 Oct 4 09:15 copyright.txt
> drwxrwxr-x. 7 jboss root 4096 Oct 4 09:15 docs
> -rw-rw-r--. 1 jboss root 489207 Oct 4 09:15 jboss-modules.jar
> drwxrwxr-x. 5 jboss root 4096 Oct 4 09:15 modules
> drwxrwxr-x. 5 jboss root 4096 Oct 4 09:16 standalone
> drwxrwxr-x. 2 jboss root 4096 Oct 4 09:15 welcome-content
> [jboss@8a0a5cd2e76a ~]$ ll /opt/jboss/wildfly
> ls: cannot access /opt/jboss/wildfly: No such file or directory
> {noformat}
> The JBOSS_HOME variable is hard coded in a operator code - https://github.com/wildfly/wildfly-operator/blob/master/build/Dockerfile#L4 (/opt/jboss/wildfly at the moment - operator doesn't work with wildfly18 image).
> *doesn't work* here means that scale down stuck due to:
> {noformat}
> {"level":"info","ts":1570603971.690961,"logger":"wildflyserver_controller","msg":"Statefulset was not scaled to the desired replica size 0 (current StatefulSet size: 1). Transaction recovery scaledown process has not cleaned all pods. Please, check status of the WildflyServer simple-jaxrs-wildfly","StatefulSet.Namespace":"pkremens-namespace","StatefulSet.Name":"simple-jaxrs-wildfly"}
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFWIP-237) Wildfly operator scale down stuck with wildfly18 image
by Ondrej Chaloupka (Jira)
[ https://issues.jboss.org/browse/WFWIP-237?page=com.atlassian.jira.plugin.... ]
Ondrej Chaloupka commented on WFWIP-237:
----------------------------------------
I expect this was solved by the https://github.com/wildfly/wildfly-operator/pull/113, wasn't it?
> Wildfly operator scale down stuck with wildfly18 image
> ------------------------------------------------------
>
> Key: WFWIP-237
> URL: https://issues.jboss.org/browse/WFWIP-237
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Petr Kremensky
> Assignee: Jeff Mesnil
> Priority: Critical
> Labels: operator
> Attachments: logs.txt
>
>
> *quay.io/wildfly/wildfly-centos7:17.0*
> {noformat}
> $ docker run -ti quay.io/wildfly/wildfly-centos7:17.0 /bin/bash
> [jboss@1cc52cbad596 ~]$ echo $JBOSS_HOME
> /opt/jboss/wildfly
> [jboss@1cc52cbad596 ~]$ ll /opt/wildfly
> ls: cannot access /opt/wildfly: No such file or directory
> [jboss@1cc52cbad596 ~]$ ll /opt/jboss/wildfly
> total 540
> -rw-rw-r--. 1 jboss root 26530 Jun 11 12:46 LICENSE.txt
> -rw-rw-r--. 1 jboss root 2221 Jun 11 12:46 README.txt
> drwxrwxr-x. 3 jboss root 4096 Jun 11 12:46 appclient
> drwxrwxr-x. 4 jboss root 4096 Jun 11 12:46 bin
> -rw-rw-r--. 1 jboss root 2451 Jun 11 12:46 copyright.txt
> drwxrwxr-x. 6 jboss root 4096 Jun 11 12:46 docs
> -rw-rw-r--. 1 jboss root 489207 Jun 11 12:46 jboss-modules.jar
> drwxrwxr-x. 5 jboss root 4096 Jun 11 12:46 modules
> drwxrwxr-x. 5 jboss root 4096 Jun 11 12:46 standalone
> drwxrwxr-x. 2 jboss root 4096 Jun 11 12:46 welcome-content
> {noformat}
> *quay.io/wildfly/wildfly-centos7:18.0*
> {noformat}
> $ docker run -ti quay.io/wildfly/wildfly-centos7:18.0 /bin/bash
> [jboss@8a0a5cd2e76a ~]$ echo $JBOSS_HOME
> /opt/wildfly
> [jboss@8a0a5cd2e76a ~]$ ll /opt/wildfly
> total 540
> -rw-rw-r--. 1 jboss root 26530 Oct 4 09:15 LICENSE.txt
> -rw-rw-r--. 1 jboss root 2224 Oct 4 09:15 README.txt
> drwxrwxr-x. 3 jboss root 4096 Oct 4 09:15 appclient
> drwxrwxr-x. 4 jboss root 4096 Oct 4 09:15 bin
> -rw-rw-r--. 1 jboss root 2451 Oct 4 09:15 copyright.txt
> drwxrwxr-x. 7 jboss root 4096 Oct 4 09:15 docs
> -rw-rw-r--. 1 jboss root 489207 Oct 4 09:15 jboss-modules.jar
> drwxrwxr-x. 5 jboss root 4096 Oct 4 09:15 modules
> drwxrwxr-x. 5 jboss root 4096 Oct 4 09:16 standalone
> drwxrwxr-x. 2 jboss root 4096 Oct 4 09:15 welcome-content
> [jboss@8a0a5cd2e76a ~]$ ll /opt/jboss/wildfly
> ls: cannot access /opt/jboss/wildfly: No such file or directory
> {noformat}
> The JBOSS_HOME variable is hard coded in a operator code - https://github.com/wildfly/wildfly-operator/blob/master/build/Dockerfile#L4 (/opt/jboss/wildfly at the moment - operator doesn't work with wildfly18 image).
> *doesn't work* here means that scale down stuck due to:
> {noformat}
> {"level":"info","ts":1570603971.690961,"logger":"wildflyserver_controller","msg":"Statefulset was not scaled to the desired replica size 0 (current StatefulSet size: 1). Transaction recovery scaledown process has not cleaned all pods. Please, check status of the WildflyServer simple-jaxrs-wildfly","StatefulSet.Namespace":"pkremens-namespace","StatefulSet.Name":"simple-jaxrs-wildfly"}
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFWIP-237) Wildfly operator scale down stuck with wildfly18 image
by Ondrej Chaloupka (Jira)
[ https://issues.jboss.org/browse/WFWIP-237?page=com.atlassian.jira.plugin.... ]
Ondrej Chaloupka edited comment on WFWIP-237 at 10/10/19 6:15 AM:
------------------------------------------------------------------
I assume this was solved by the https://github.com/wildfly/wildfly-operator/pull/113, wasn't it?
was (Author: ochaloup):
I expect this was solved by the https://github.com/wildfly/wildfly-operator/pull/113, wasn't it?
> Wildfly operator scale down stuck with wildfly18 image
> ------------------------------------------------------
>
> Key: WFWIP-237
> URL: https://issues.jboss.org/browse/WFWIP-237
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Petr Kremensky
> Assignee: Jeff Mesnil
> Priority: Critical
> Labels: operator
> Attachments: logs.txt
>
>
> *quay.io/wildfly/wildfly-centos7:17.0*
> {noformat}
> $ docker run -ti quay.io/wildfly/wildfly-centos7:17.0 /bin/bash
> [jboss@1cc52cbad596 ~]$ echo $JBOSS_HOME
> /opt/jboss/wildfly
> [jboss@1cc52cbad596 ~]$ ll /opt/wildfly
> ls: cannot access /opt/wildfly: No such file or directory
> [jboss@1cc52cbad596 ~]$ ll /opt/jboss/wildfly
> total 540
> -rw-rw-r--. 1 jboss root 26530 Jun 11 12:46 LICENSE.txt
> -rw-rw-r--. 1 jboss root 2221 Jun 11 12:46 README.txt
> drwxrwxr-x. 3 jboss root 4096 Jun 11 12:46 appclient
> drwxrwxr-x. 4 jboss root 4096 Jun 11 12:46 bin
> -rw-rw-r--. 1 jboss root 2451 Jun 11 12:46 copyright.txt
> drwxrwxr-x. 6 jboss root 4096 Jun 11 12:46 docs
> -rw-rw-r--. 1 jboss root 489207 Jun 11 12:46 jboss-modules.jar
> drwxrwxr-x. 5 jboss root 4096 Jun 11 12:46 modules
> drwxrwxr-x. 5 jboss root 4096 Jun 11 12:46 standalone
> drwxrwxr-x. 2 jboss root 4096 Jun 11 12:46 welcome-content
> {noformat}
> *quay.io/wildfly/wildfly-centos7:18.0*
> {noformat}
> $ docker run -ti quay.io/wildfly/wildfly-centos7:18.0 /bin/bash
> [jboss@8a0a5cd2e76a ~]$ echo $JBOSS_HOME
> /opt/wildfly
> [jboss@8a0a5cd2e76a ~]$ ll /opt/wildfly
> total 540
> -rw-rw-r--. 1 jboss root 26530 Oct 4 09:15 LICENSE.txt
> -rw-rw-r--. 1 jboss root 2224 Oct 4 09:15 README.txt
> drwxrwxr-x. 3 jboss root 4096 Oct 4 09:15 appclient
> drwxrwxr-x. 4 jboss root 4096 Oct 4 09:15 bin
> -rw-rw-r--. 1 jboss root 2451 Oct 4 09:15 copyright.txt
> drwxrwxr-x. 7 jboss root 4096 Oct 4 09:15 docs
> -rw-rw-r--. 1 jboss root 489207 Oct 4 09:15 jboss-modules.jar
> drwxrwxr-x. 5 jboss root 4096 Oct 4 09:15 modules
> drwxrwxr-x. 5 jboss root 4096 Oct 4 09:16 standalone
> drwxrwxr-x. 2 jboss root 4096 Oct 4 09:15 welcome-content
> [jboss@8a0a5cd2e76a ~]$ ll /opt/jboss/wildfly
> ls: cannot access /opt/jboss/wildfly: No such file or directory
> {noformat}
> The JBOSS_HOME variable is hard coded in a operator code - https://github.com/wildfly/wildfly-operator/blob/master/build/Dockerfile#L4 (/opt/jboss/wildfly at the moment - operator doesn't work with wildfly18 image).
> *doesn't work* here means that scale down stuck due to:
> {noformat}
> {"level":"info","ts":1570603971.690961,"logger":"wildflyserver_controller","msg":"Statefulset was not scaled to the desired replica size 0 (current StatefulSet size: 1). Transaction recovery scaledown process has not cleaned all pods. Please, check status of the WildflyServer simple-jaxrs-wildfly","StatefulSet.Namespace":"pkremens-namespace","StatefulSet.Name":"simple-jaxrs-wildfly"}
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (DROOLS-4632) Optimize single pattern forall statement
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-4632?page=com.atlassian.jira.plugi... ]
Mario Fusco resolved DROOLS-4632.
---------------------------------
Resolution: Done
Fixed by https://github.com/kiegroup/drools/commit/21c612aee9fa0d5bc593af941f438b5...
> Optimize single pattern forall statement
> ----------------------------------------
>
> Key: DROOLS-4632
> URL: https://issues.jboss.org/browse/DROOLS-4632
> Project: Drools
> Issue Type: Enhancement
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Priority: Major
>
> At the moment a single pattern forall statement like
> {code}
> forall( Type( constraints ) )
> {code}
> it is automatically rewritten as
> {code}
> forall( $t : Type() Type( this == $t, constraints ) )
> {code}
> and then implemented with 2 not nodes and join.
> {code}
> [EntryPointNode(1) EntryPoint::DEFAULT ] on Partition(MAIN)
> [ObjectTypeNode(4)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.testcoverage.common.model.Person] expiration=-1ms ] on Partition(MAIN)
> [JoinNode(5) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 0
> [NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 9223372036854775807 Ri 9223372036854775807
> RightInputAdapterNode(8)[ tupleMemoryEnabled=true, tupleSource=[NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]], source=null, associations={[Rule name=R1, agendaGroup=MAIN, salience=0, no-loop=false]=1}, partitionId=Partition(1)] on Partition(1)
> [NotNode(9) - <source from a subnetwork>] on Partition(1) Ld 0 Li 0 Rd -1 Ri -1
> [RuleTerminalNode(10): rule=R1] on Partition(1) d -1 i -1
> [AlphaNode(6) constraint=!(age >= 18) || !(name.startsWith("M"))] on Partition(1) d 2056 i 9223372036854775807
> [NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 9223372036854775807 Ri 9223372036854775807
> [ObjectTypeNode(2)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.core.reteoo.InitialFactImpl] expiration=-1ms ] on Partition(MAIN)
> [LeftInputAdapterNode(3)] on Partition(1) Ld 0 Li 0
> [JoinNode(5) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 0
> [NotNode(9) - <source from a subnetwork>] on Partition(1) Ld 0 Li 0 Rd -1 Ri -1
> {code}
> It would be much faster to rewrite it as
> {code}
> not( Type( !constraints ) )
> {code}
> and then evaluate it with one single not node.
> {code}
> [EntryPointNode(1) EntryPoint::DEFAULT ] on Partition(MAIN)
> [ObjectTypeNode(4)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.testcoverage.common.model.Person] expiration=-1ms ] on Partition(MAIN)
> [AlphaNode(5) constraint=!(age >= 18) || !(name.startsWith("M"))] on Partition(1) d 2056 i 2056
> [NotNode(6) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 2056
> [RuleTerminalNode(7): rule=R1] on Partition(1) d -1 i -1
> [ObjectTypeNode(2)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.core.reteoo.InitialFactImpl] expiration=-1ms ] on Partition(MAIN)
> [LeftInputAdapterNode(3)] on Partition(1) Ld 0 Li 0
> [NotNode(6) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 2056
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (DROOLS-4620) Executable model compilation fails with 'inference variable A has incompatible bounds' when using accumulate
by Luca Molteni (Jira)
[ https://issues.jboss.org/browse/DROOLS-4620?page=com.atlassian.jira.plugi... ]
Luca Molteni updated DROOLS-4620:
---------------------------------
Sprint: 2019 Week 41-43 (from Okt 7)
> Executable model compilation fails with 'inference variable A has incompatible bounds' when using accumulate
> ------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-4620
> URL: https://issues.jboss.org/browse/DROOLS-4620
> Project: Drools
> Issue Type: Bug
> Components: core engine, executable model
> Affects Versions: 7.27.0.Final
> Reporter: Martin Weiler
> Assignee: Luca Molteni
> Priority: Major
> Labels: support
>
> A rule containing the following accumulate constraint:
> {noformat}
> when
> $max1 : Number() from accumulate(
> StockTick($time : dueDate);
> max($time.getTime().getTime()))
> // object model:
> public class StockTick {
> ...
> public Calendar getDueDate() {
> return dueDate;
> }
> {noformat}
> fails to compile:
> {noformat}
> reason: varargs mismatch; inference variable A has incompatible bounds
> equality constraints: java.lang.Long
> lower bounds: java.util.Date], Message [id=3, level=ERROR, path=src/main/java/defaultpkg/RulesE50E409E17279CAE524E8EC1D671D39BRuleMethods0.java, line=0, column=0
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (DROOLS-4632) Optimize single pattern forall statement
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-4632?page=com.atlassian.jira.plugi... ]
Mario Fusco updated DROOLS-4632:
--------------------------------
Description:
At the moment a single pattern forall statement like
{code}
forall( Type( constraints ) )
{code}
it is automatically rewritten as
{code}
forall( $t : Type() Type( this == $t, constraints ) )
{code}
and then implemented with 2 not nodes and join.
{code}
[EntryPointNode(1) EntryPoint::DEFAULT ] on Partition(MAIN)
[ObjectTypeNode(4)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.testcoverage.common.model.Person] expiration=-1ms ] on Partition(MAIN)
[JoinNode(5) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 0
[NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 9223372036854775807 Ri 9223372036854775807
RightInputAdapterNode(8)[ tupleMemoryEnabled=true, tupleSource=[NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]], source=null, associations={[Rule name=R1, agendaGroup=MAIN, salience=0, no-loop=false]=1}, partitionId=Partition(1)] on Partition(1)
[NotNode(9) - <source from a subnetwork>] on Partition(1) Ld 0 Li 0 Rd -1 Ri -1
[RuleTerminalNode(10): rule=R1] on Partition(1) d -1 i -1
[AlphaNode(6) constraint=!(age >= 18) || !(name.startsWith("M"))] on Partition(1) d 2056 i 9223372036854775807
[NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 9223372036854775807 Ri 9223372036854775807
[ObjectTypeNode(2)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.core.reteoo.InitialFactImpl] expiration=-1ms ] on Partition(MAIN)
[LeftInputAdapterNode(3)] on Partition(1) Ld 0 Li 0
[JoinNode(5) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 0
[NotNode(9) - <source from a subnetwork>] on Partition(1) Ld 0 Li 0 Rd -1 Ri -1
{code}
It would be much faster to rewrite it as
{code}
not( Type( !constraints ) )
{code}
and then evaluate it with one single not node.
{code}
[EntryPointNode(1) EntryPoint::DEFAULT ] on Partition(MAIN)
[ObjectTypeNode(4)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.testcoverage.common.model.Person] expiration=-1ms ] on Partition(MAIN)
[AlphaNode(5) constraint=!(age >= 18) || !(name.startsWith("M"))] on Partition(1) d 2056 i 2056
[NotNode(6) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 2056
[RuleTerminalNode(7): rule=R1] on Partition(1) d -1 i -1
[ObjectTypeNode(2)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.core.reteoo.InitialFactImpl] expiration=-1ms ] on Partition(MAIN)
[LeftInputAdapterNode(3)] on Partition(1) Ld 0 Li 0
[NotNode(6) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 2056
{code}
was:
At the moment a single pattern forall statement like
{code}
forall( Type( constraints ) )
{code}
it is automatically rewritten as
{code}
forall( $t : Type() Type( this == $t, constraints ) )
{code}
and then implemented with 2 not nodes and join. It would be much faster to rewrite it as
{code}
not( Type( !constraints ) )
{code}
and then evaluate it with one single not node.
> Optimize single pattern forall statement
> ----------------------------------------
>
> Key: DROOLS-4632
> URL: https://issues.jboss.org/browse/DROOLS-4632
> Project: Drools
> Issue Type: Enhancement
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Priority: Major
>
> At the moment a single pattern forall statement like
> {code}
> forall( Type( constraints ) )
> {code}
> it is automatically rewritten as
> {code}
> forall( $t : Type() Type( this == $t, constraints ) )
> {code}
> and then implemented with 2 not nodes and join.
> {code}
> [EntryPointNode(1) EntryPoint::DEFAULT ] on Partition(MAIN)
> [ObjectTypeNode(4)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.testcoverage.common.model.Person] expiration=-1ms ] on Partition(MAIN)
> [JoinNode(5) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 0
> [NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 9223372036854775807 Ri 9223372036854775807
> RightInputAdapterNode(8)[ tupleMemoryEnabled=true, tupleSource=[NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]], source=null, associations={[Rule name=R1, agendaGroup=MAIN, salience=0, no-loop=false]=1}, partitionId=Partition(1)] on Partition(1)
> [NotNode(9) - <source from a subnetwork>] on Partition(1) Ld 0 Li 0 Rd -1 Ri -1
> [RuleTerminalNode(10): rule=R1] on Partition(1) d -1 i -1
> [AlphaNode(6) constraint=!(age >= 18) || !(name.startsWith("M"))] on Partition(1) d 2056 i 9223372036854775807
> [NotNode(7) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 9223372036854775807 Ri 9223372036854775807
> [ObjectTypeNode(2)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.core.reteoo.InitialFactImpl] expiration=-1ms ] on Partition(MAIN)
> [LeftInputAdapterNode(3)] on Partition(1) Ld 0 Li 0
> [JoinNode(5) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 0
> [NotNode(9) - <source from a subnetwork>] on Partition(1) Ld 0 Li 0 Rd -1 Ri -1
> {code}
> It would be much faster to rewrite it as
> {code}
> not( Type( !constraints ) )
> {code}
> and then evaluate it with one single not node.
> {code}
> [EntryPointNode(1) EntryPoint::DEFAULT ] on Partition(MAIN)
> [ObjectTypeNode(4)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.testcoverage.common.model.Person] expiration=-1ms ] on Partition(MAIN)
> [AlphaNode(5) constraint=!(age >= 18) || !(name.startsWith("M"))] on Partition(1) d 2056 i 2056
> [NotNode(6) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 2056
> [RuleTerminalNode(7): rule=R1] on Partition(1) d -1 i -1
> [ObjectTypeNode(2)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.core.reteoo.InitialFactImpl] expiration=-1ms ] on Partition(MAIN)
> [LeftInputAdapterNode(3)] on Partition(1) Ld 0 Li 0
> [NotNode(6) - [ClassObjectType class=org.drools.testcoverage.common.model.Person]] on Partition(1) Ld -1 Li -1 Rd 0 Ri 2056
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (DROOLS-4620) Executable model compilation fails with 'inference variable A has incompatible bounds' when using accumulate
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-4620?page=com.atlassian.jira.plugi... ]
Mario Fusco reassigned DROOLS-4620:
-----------------------------------
Assignee: Luca Molteni (was: Mario Fusco)
> Executable model compilation fails with 'inference variable A has incompatible bounds' when using accumulate
> ------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-4620
> URL: https://issues.jboss.org/browse/DROOLS-4620
> Project: Drools
> Issue Type: Bug
> Components: core engine, executable model
> Affects Versions: 7.27.0.Final
> Reporter: Martin Weiler
> Assignee: Luca Molteni
> Priority: Major
> Labels: support
>
> A rule containing the following accumulate constraint:
> {noformat}
> when
> $max1 : Number() from accumulate(
> StockTick($time : dueDate);
> max($time.getTime().getTime()))
> // object model:
> public class StockTick {
> ...
> public Calendar getDueDate() {
> return dueDate;
> }
> {noformat}
> fails to compile:
> {noformat}
> reason: varargs mismatch; inference variable A has incompatible bounds
> equality constraints: java.lang.Long
> lower bounds: java.util.Date], Message [id=3, level=ERROR, path=src/main/java/defaultpkg/RulesE50E409E17279CAE524E8EC1D671D39BRuleMethods0.java, line=0, column=0
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (DROOLS-4626) Inserting already expired events are not taken into account in the collect operation in the first fireAllRules
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-4626?page=com.atlassian.jira.plugi... ]
Mario Fusco updated DROOLS-4626:
--------------------------------
Sprint: 2019 Week 41-43 (from Okt 7)
> Inserting already expired events are not taken into account in the collect operation in the first fireAllRules
> --------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-4626
> URL: https://issues.jboss.org/browse/DROOLS-4626
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.27.0.Final
> Reporter: Oscar Molina
> Assignee: Mario Fusco
> Priority: Major
> Labels: support
>
> Migrating a project from Drools 6.5.x to 7.x, if we insert already expired events, they are not taken into account in the collect operation in the first fireAllRules. Expired event in STREAM mode are not taken into account when using collect operation. it seems not to be aligned with drools design requirement: "Expired events does not cancel rule activations". This was not the case with the last 6.5 version.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (DROOLS-4633) Optimize self-join patterns forall statement
by Mario Fusco (Jira)
Mario Fusco created DROOLS-4633:
-----------------------------------
Summary: Optimize self-join patterns forall statement
Key: DROOLS-4633
URL: https://issues.jboss.org/browse/DROOLS-4633
Project: Drools
Issue Type: Enhancement
Reporter: Mario Fusco
Assignee: Mario Fusco
At the moment a forall statement with a self join like
{code}
forall( $t : Type( constraints1 ) Type( this == $t, constraints2 ) )
{code}
is implemented with 2 not nodes and a join. It would be much faster to rewrite it as
{code}
not( Type( constraints1, !constraints2 ) )
{code}
and then evaluate it with one single not node.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months