-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1121,8 +1121,9 @@ private static TupleImpl insertPeerLeftTuple(InternalWorkingMemory wm, | |
| memory.getSegmentMemory().getStagedLeftTuples().addInsert(peer); | ||
| } else { | ||
| // If parent is Lian, then this must be called, so that any linking or unlinking can be done. | ||
| LeftInputAdapterNode.doInsertSegmentMemoryWithFlush(wm, true, liaMem, memory.getSegmentMemory(), peer, node | ||
| .getLeftTupleSource().isStreamMode()); | ||
| List<PathMemory> pathsToFlush = LeftInputAdapterNode.doInsertSegmentMemory(wm, true, liaMem, memory.getSegmentMemory(), peer, node | ||
| .getLeftTupleSource().isStreamMode() ); | ||
| wm.getRuleNetworkEvaluator().forceFlushPaths(pathsToFlush); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| } | ||
|
|
||
| return peer; | ||
|
|
||
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
IfNeededbit from the name of this method (unless you have a good reason to keep it).Uh oh!
There was an error while loading. Please reload this page.
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.