[jboss-jira] [JBoss JIRA] (JBRULES-3658) Constraint disappearing from rete network due to alpha node hashing
Mario Fusco (JIRA)
jira-events at lists.jboss.org
Wed Oct 17 11:27:01 EDT 2012
[ https://issues.jboss.org/browse/JBRULES-3658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco reassigned JBRULES-3658:
------------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Constraint disappearing from rete network due to alpha node hashing
> -------------------------------------------------------------------
>
> Key: JBRULES-3658
> URL: https://issues.jboss.org/browse/JBRULES-3658
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler
> Affects Versions: 5.4.0.Final
> Environment: java version "1.6.0_32"
> Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
> Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)
> Reporter: Adar Dembo
> Assignee: Mario Fusco
>
> Under very specific conditions, the alpha node hashing in CompositeObjectSinkAdapter can "drop" viable sinks from the RETE network. Specifically, if two alpha nodes represent the same constraint, the hashing will view them as identical even if the outbound sinks from these nodes differ.
> Using ReteooVisitor from the Drools Eclipse plugin as inspiration, I wrote some code to walk my knowledge base from a particular ObjectTypeNode and describe each node along the way. The results are below:
> {noformat}
> [ObjectTypeNode(56)::EntryPoint::DEFAULT objectType=[ClassObjectType class=com.cloudera.cmf.model.DbRoleConfigGroup] expiration=-1ms ]
> X [AlphaNode(219) constraint=roleType == "GATEWAY"] (hashCode -578253791, index 1)
> [JoinNode(220) - [ClassObjectType class=com.cloudera.cmf.model.DbRoleConfigGroup]]
> [ AccumulateNode(221) ]
> [RuleTerminalNode(222): rule=Compute mapred_submit_replication for MR2 Service]
> [AlphaNode(214) constraint=roleType == "GATEWAY"] (hashCode -578253791, index 1)
> [JoinNode(215) - [ClassObjectType class=com.cloudera.cmf.model.DbRoleConfigGroup]]
> [ AccumulateNode(216) ]
> [RuleTerminalNode(217): rule=Compute mapred_submit_replication for MapReduce Service]
> X [AlphaNode(57) constraint=roleType == HdfsServiceHandler.RoleNames.NAMENODE.name()]
> [JoinNode(58) - [ClassObjectType class=com.cloudera.cmf.model.DbRoleConfigGroup]]
> [RuleTerminalNode(59): rule=Compute dfs_namenode_handler_count for an NN role config group]
> X [AlphaNode(194) constraint=roleType == MapReduceServiceHandler.RoleNames.TASKTRACKER.name()]
> [JoinNode(195) - [ClassObjectType class=com.cloudera.cmf.model.DbRoleConfigGroup]]
> [ExistsNode(197) - [ClassObjectType class=com.cloudera.cmf.model.DbService]]
> [RuleTerminalNode(198): rule=Configure MapReduce TT instrumentation with MGMT]
> [NotNode(199) - [ClassObjectType class=com.cloudera.cmf.model.DbService]]
> [RuleTerminalNode(200): rule=Configure MapReduce TT instrumentation without MGMT]
> X [AlphaNode(210) constraint=roleType == MapReduceServiceHandler.RoleNames.JOBTRACKER.name()]
> [JoinNode(211) - [ClassObjectType class=com.cloudera.cmf.model.DbRoleConfigGroup]]
> [RuleTerminalNode(212): rule=Compute mapred_job_tracker_handler_count for MapReduce Service]
> X [AlphaNode(62) constraint=roleType == HueServiceHandler.RoleNames.BEESWAX_SERVER.name()]
> [JoinNode(63) - [ClassObjectType class=com.cloudera.cmf.model.DbRoleConfigGroup]]
> [RuleTerminalNode(64): rule=Assign Beeswax Warehouse dir]
> X [JoinNode(235) - [ClassObjectType class=com.cloudera.cmf.model.DbRoleConfigGroup]]
> [QueryTerminalNode(236): query=FIND_ALL_ROLE_CONFIG_GROUPS]
> {noformat}
> Every node that made it into the adapter's hashedSinkMap, hashableSinks, or otherSinks is marked with an 'X'. Note that alpha node 214 is missing. It was in hashedSinkMap, but was evicted when alpha node 219 was added, because 219 hashes to the same key. Without alpha node 214, the rest of a rule underneath it becomes orphaned and never fires.
--
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