Rikkola opened a new pull request, #7135: URL: https://github.com/apache/incubator-kie/pull/7135
Closes https://github.com/apache/incubator-kie/issues/7134 Two related bugs, both triggered by cross-package segment sharing that causes EagerPhreakBuilder.processSplit() to split the inner subnetwork segment: 1. Fact retraction stops the rule firing permanently - EagerPhreakBuilder left sibling PathMemory segmentMemories[] slots null after the split, corrupting bitmask and linking calculations. - SegmentMemorySupportImpl early-returned if the segment already had one child, skipping initialisation for sibling sinks after a split. - TupleToObjectNode.unlinkedSegment did not notify downstream subnetwork sinks unless the whole rule link status transitioned. - SingleObjectSinkAdapter re-linked NotNode without staging existing left tuples as updates. 2. removeRule strips SubnetworkPathMemory from shared inner segments The second loop in removeExistingPaths did not guard against shared TupleToObjectNode end nodes (associatedTerminalsSize > 1), unlike the first loop which already skipped them correctly. This stripped the SubnetworkPathMemory needed for re-linking, so the surviving not-rule never re-fired after the sibling rule was removed. Fixes: - Lazily initialise missing SegmentMemory in EagerPhreakBuilder to populate the sibling's path memory slot. - Check all sinks in SegmentMemorySupportImpl when sinkPropagator size > 1. - Explicitly trigger doUnlinkRule in TupleToObjectNode when a segment unlinks. - Stage left tuples as updates in SingleObjectSinkAdapter when re-linking NotNode. - Guard the second removeExistingPaths loop against shared endNodes. Reproducers: NotFromListCrossPkgTest, SubnetworkSegmentSplitIntegrationTest#testTP03 Assisted by IBM Bob -- 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]
