tkobayas commented on code in PR #7250:
URL: https://github.com/apache/incubator-kie/pull/7250#discussion_r4441615070
##########
drools-kiesession/src/main/java/org/drools/kiesession/entrypoints/NamedEntryPoint.java:
##########
@@ -196,6 +196,12 @@ public FactHandle insert(final Object object,
null,
entryPoint);
if ( this.reteEvaluator.isSequential() ) {
+ // check if the object already exists in the WM
+ final InternalFactHandle existingHandle =
this.objectStore.getHandleForObject( object );
+ if ( existingHandle != null ) {
+ return existingHandle;
+ }
Review Comment:
This objectStore check is the fix and it's done in non-sequential mode. It
might have been omitted in sequential mode for a performance reason, but it's a
HashMap get, so the performance impact is negligible,
--
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]