tkobayas commented on issue #6297:
URL: 
https://github.com/apache/incubator-kie-drools/issues/6297#issuecomment-2771873786

   Rete is like this:
   ```
   [EntryPointNode(1) EntryPoint::DEFAULT ] on Partition(MAIN)
     [ObjectTypeNode(3)::EntryPoint::DEFAULT objectType=[ClassObjectType 
class=org.drools.compiler.integrationtests.AccumulateTest$Cart] expiration=-1ms 
] on Partition(MAIN)
       [AlphaTerminalNode(4)] on Partition(1) Ld 0 Li 0
         [RuleTerminalNode(5): rule=R1] on Partition(1) d 0 i 0
       [LeftInputAdapterNode(6)] on Partition(2) Ld 0 Li 0
         [FromNode(7)] 
<result=org.drools.compiler.integrationtests.AccumulateTest$Item, 
alphaConstraints=[], betaConstraints=[]>  on Partition(2) Ld 0 Li 0
           [RightInputAdapterNode(8)] on Partition(2)
             [ AccumulateNode(9) ] <contraints=[], resultConstraints=[], 
resultBinder=[]>  on Partition(2) Ld 0 Li 0 Rd -1 Ri -1
               [RuleTerminalNode(10): rule=R2] on Partition(2) d -1 i -1
             [ AccumulateNode(11) ] <contraints=[], resultConstraints=[intValue 
>= 13000], resultBinder=[]>  on Partition(2) Ld 0 Li 0 Rd -1 Ri -1
               [RuleTerminalNode(12): rule=R3] on Partition(2) d -1 i -1
           [RightInputAdapterNode(13)] on Partition(2)
             [ AccumulateNode(14) ] <contraints=[], resultConstraints=[intValue 
>= 0], resultBinder=[]>  on Partition(2) Ld 0 Li 0 Rd -1 Ri -1
               [RuleTerminalNode(15): rule=R4] on Partition(2) d -1 i -1
         [ AccumulateNode(9) ] <contraints=[], resultConstraints=[], 
resultBinder=[]>  on Partition(2) Ld 0 Li 0 Rd -1 Ri -1
         [ AccumulateNode(11) ] <contraints=[], resultConstraints=[intValue >= 
13000], resultBinder=[]>  on Partition(2) Ld 0 Li 0 Rd -1 Ri -1
         [ AccumulateNode(14) ] <contraints=[], resultConstraints=[intValue >= 
0], resultBinder=[]>  on Partition(2) Ld 0 Li 0 Rd -1 Ri -1
     [ObjectTypeNode(2)::EntryPoint::DEFAULT objectType=[ClassObjectType 
class=org.drools.base.reteoo.InitialFactImpl] expiration=-1ms ] on 
Partition(MAIN)
   ```
   
   Key points:
   - There are 2 RightInputAdapterNodes under FromNode, because 
RightInputAdapterNode is not share if agenda-group is different. 
https://github.com/apache/incubator-kie-drools/blob/10.0.0/drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java#L186-L197
 . It triggers peer creation in `RuleNetworkEvaluator.innerEval`
   - One RightInputAdapterNode has 2 AccumulateNodes, so it triggers peer 
creation in `RuleNetworkEvaluator.doRiaNode2`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to