tkobayas commented on code in PR #6768:
URL:
https://github.com/apache/incubator-kie-drools/pull/6768#discussion_r3449504374
##########
drools-core/src/main/java/org/drools/core/phreak/RuleExecutor.java:
##########
@@ -345,7 +345,7 @@ public void removeActiveTuple(RuleTerminalNodeLeftTuple
tuple) {
activeMatches.remove(tuple);
if (tuple.getStagedType() != Tuple.DELETE) {
addDormantTuple(tuple);
- }
+ } // if Tuple.DELETE, then the tuple should be removed/dereferenced
entirely, so not in activeMatches nor dormantMatches.
Review Comment:
Previously we were looking at this path as the "orphan path", but actually,
this is intentional -- the tuple is (will be) deleted, so no longer referenced
by parent node's memory. So the tuple should not belong to activeMatches nor
dormantMatches. Finally, will be GC'ed. So we could say it's "REMOVED" state,
rather than "ORPHANED". (If someone holds the reference, it could be a cause of
another bug)
--
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]