[jboss-jira] [JBoss JIRA] (DROOLS-2892) Session reset doesn't clear path memory

Christian Liebhardt (JIRA) issues at jboss.org
Wed Sep 5 07:29:00 EDT 2018


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

Christian Liebhardt commented on DROOLS-2892:
---------------------------------------------

I did a first test with a snapshot build of 7.12.0 (commit f3c90f6040714b4e9b34f8fffb3cdaeb4dc501ff) and the issue appears to be resolved. We will run a final test with 7.11.0.Final as soon as it's available.

> Session reset doesn't clear path memory
> ---------------------------------------
>
>                 Key: DROOLS-2892
>                 URL: https://issues.jboss.org/browse/DROOLS-2892
>             Project: Drools
>          Issue Type: Bug
>            Reporter: Christian Liebhardt
>            Assignee: Mario Fusco
>
> As discussed in https://groups.google.com/forum/#!topic/drools-usage/V8ypP1o5SwM : 
> In order to reduce memory allocations we are calling _StatefulKnowledgeSessionImpl.reset()_ to bring a disposed session back into life. From our understanding this is the same method which the Drools session cache would use. During our tests we found that some of our rules don't trigger if we use this approach. We also found that the reset method leaves _PathMemory_ instances behind in the memory. As soon as we cleared the memory explicitly by calling  _session.getNodeMemories().clear()_ after every _session.reset()_ the rules fired again as usual. So we are wondering if the current implementation of _session.reset()_ is incomplete.
> We are aware that _session.reset()_ is an internal method. However this issue should also affect the session cache feature of Drools. At the same time it would be nice to have a public interface to _session.reset()_ since in our application reusing a session is beneficial but we don't need the session cache as we can easily remember the last session which we used for processing and it seems more straightforward to just bring that one back to life instead of storing and retrieving it from a cache.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list