Bug 1000393

Summary: Session caching in DroolsEventProcessor breaks the functionality
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jiri Pechanec <jpechane>
Component: RT GovernanceAssignee: Gary Brown <gbrown>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Pechanec <jpechane>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: atangrin, ncross
Target Milestone: ER2   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jiri Pechanec 2013-08-23 11:02:51 UTC
DroolsEventProcessor contains knowledge session caching. Every ruleName has associated knowledgesession stored in a static map cache and the knowledgesession is primed with EPContext associated with the node.

There are two bugs then
1) If there are two nodes with the same ruleName then the session is shared among them - effectively using wrong EPContext in one case
2) When the app is re-deployed then the session for no longer existing node is reused with invalid EPContext. Moreover Drools will stop evaluation of rules.

Comment 1 Gary Brown 2013-09-02 13:50:46 UTC
Removed static cache of sessions, as not really required, so now each distinct node has its own session.

Comment 2 JBoss JIRA Server 2013-09-02 13:54:12 UTC
Gary Brown <gary> updated the status of jira RTGOV-259 to Resolved

Comment 3 JBoss JIRA Server 2013-09-02 13:54:12 UTC
Gary Brown <gary> made a comment on jira RTGOV-259

Removed static cache of sessions, so now each node has its own session linked to its own EPNContext.

Only issue is where the EPN (and therefore node) is updated to a new version - if temporal rules are used, then there is potential for some temporal dependencies to be lost by the correlated events spanning across the EPN versions.

Comment 7 Jiri Pechanec 2013-10-16 11:47:52 UTC
Verified in ER4

Comment 8 JBoss JIRA Server 2014-07-02 09:19:52 UTC
Gary Brown <gary> updated the status of jira RTGOV-259 to Closed