-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[incubator-kie-issues #203] Cleanup Phreak code - Minor refactoring in SegmentMemory handling #6508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| public SegmentMemory getQuerySegmentMemory(QueryElementNode queryNode); | ||
|
|
||
| public void createChildSegments(LeftTupleSinkPropagator sinkProp, SegmentMemory smem); | ||
| public void initializeChildSegmentsIfNeeded(SegmentMemory smem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpic: I would remove the IfNeeded bit from the name of this method (unless you have a good reason to keep it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco It is to clarify that the method is idempotent - you can call it twice and it won't get extra initailization.
| .getLeftTupleSource().isStreamMode()); | ||
| List<PathMemory> pathsToFlush = LeftInputAdapterNode.doInsertSegmentMemory(wm, true, liaMem, memory.getSegmentMemory(), peer, node | ||
| .getLeftTupleSource().isStreamMode() ); | ||
| wm.getRuleNetworkEvaluator().forceFlushPaths(pathsToFlush); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this force flush necessary now? Did it do this also before in a different way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco yes. If you see the method called originally was doInsertSegmentMemoryWithFlush. Now it is doInsertSegmentMemory. See changes in LeftInputAdapterNode.
This PR introduces two improvements to segment memory handling: