You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tkobayas (via GitHub)" <gi...@apache.org> on 2026/06/23 03:15:50 UTC

Re: [PR] [incubator-kie-drools-6765] Park no-loop/lock-on-active blocked tuples in dormantMatches [incubator-kie-drools]

tkobayas commented on PR #6768:
URL: https://github.com/apache/incubator-kie-drools/pull/6768#issuecomment-4775257968

   Note that this fix is to make the tuple in the correct state.
   
   Actually, even without this fix, the rule execution works correctly by the NPE guard implemented by https://github.com/apache/incubator-kie-drools/pull/6707.
   
   ---
   
   UPDATE path (orphan receives UPDATE from a different rule):
   
   With the guard:
   1. modifyActiveTuple → guarded removeDormantTuple detects orphan → skips remove
   2. addActiveTuple → tuple enters active → fires
   
   With Approach C:
   1. modifyActiveTuple → removeDormantTuple succeeds (tuple is in dormant, not orphan)
   2. addActiveTuple → tuple enters active → fires
   
   Same result. The tuple correctly fires because the no-loop condition no longer applies (different rule triggered the UPDATE).
   
   DELETE path (orphan receives DELETE):
   
   With the guard:
   1. doLeftDelete → guarded removeDormantTuple detects orphan → skips remove
   2. setContextObject(null) → tuple cleaned up
   
   With Approach C:
   1. doLeftDelete → removeDormantTuple succeeds (tuple is in dormant, not orphan)
   2. setContextObject(null) → tuple cleaned up
   
   Same result.
   
   So functionally the NPE guard is sufficient. The advantage of this fix is:
   - No log noise on every orphan encounter
   - The tuple's list membership is always consistent — no "not in any list but still alive" state
   - Doesn't mask a genuine bug where a tuple was incorrectly removed from dormant
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org