[jboss-jira] [JBoss JIRA] (DROOLS-200) score corruption when using insertLogical with custom objects

Pieter van den Brink (JIRA) jira-events at lists.jboss.org
Thu Jul 25 08:51:26 EDT 2013


    [ https://issues.jboss.org/browse/DROOLS-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792901#comment-12792901 ] 

Pieter van den Brink commented on DROOLS-200:
---------------------------------------------

I found another dataset for which the issue is still reproducible after correcting the hashcode and equals of FamilyStart (both in 6.0.0.Beta5 and 6.0.0-SNAPSHOT).
See drools-200-isolated-reproducer-v2.zip, with the corrected hashcode/equals and a modified dataset created in ScheduleSolver's buildSchedule. 

When running the solver, the constraintMatchTotalMap of the ScoreDirector contains this IntConstraintMatchTotal at the time of corruption:
[defaultpkg, familyCompact, 1]=defaultpkg/familyCompact/level1=-6

This IntConstraintMatchTotal's constraintMatchSet contains the following:

defaultpkg/familyCompact/level1/[FamilyEnd Family 1, Timeslot 2, FamilyStart Family 1, Timeslot 1]=-1=java.lang.Object at 4a58115f
defaultpkg/familyCompact/level1/[FamilyEnd Family 1, Timeslot 3, FamilyStart Family 1, Timeslot 1]=-2=java.lang.Object at 4a58115f
defaultpkg/familyCompact/level1/[FamilyEnd Family 0, Timeslot 3, FamilyStart Family 0, Timeslot 0]=-3=java.lang.Object at 4a58115f

So it appears that there are two FamilyEnd's in memory for Family 1, which should not happen.
                
> score corruption when using insertLogical with custom objects
> -------------------------------------------------------------
>
>                 Key: DROOLS-200
>                 URL: https://issues.jboss.org/browse/DROOLS-200
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 6.0.0.Beta5
>            Reporter: Pieter van den Brink
>            Assignee: Mario Fusco
>         Attachments: drools-200-isolated-reproducer-v2.zip, drools-200-isolated-reproducer.tar.gz, reproducer.zip
>
>
> When using a rule with insertLogical to insert custom objects, score corruption occurs in certain situations. It seems like the custom objects aren't always inserted or retracted properly after a move. This causes any rule that depends on these custom objects to fire multiple times, which corrupts the score.
> Attached is a reproducer which demonstrates the issue. Also see the forum reference for a detailed discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list