Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-607

Working memory is not disposed when releasing the RuleSession

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Patch
    • Resolution: Done
    • Critical
    • 3.0.6, 4.0.0.MR2
    • 3.0.1
    • drools-jsr94
    • None

    Description

      Under heavy load conditions I encountered high cpu and hangs of the system. A thread dump shows all threads being stuck in
      java.util.WeakHashMap, which is called from AbstractRuleBase.addWorkingMemory (please refer to linked thread).
      After digging into the code it turned out that the client session object (AbstractRuleSessionImpl) has a release method. This method is supposed to releases all resources used by this rule session. And so it sets the properties, the working memory and the RuleExecutionSet to null:

      public void release()

      { this.setProperties( null ); this.setWorkingMemory( null ); this.setRuleExecutionSet( null ); }

      However, it does NOT dispose the working memory as expected.
      I added the following line to method:
      getWorkingMemory().dispose();

      Afterwards things improved significantly.

      Attachments

        Issue Links

          Activity

            People

              mproctor@redhat.com Mark Proctor
              idan.einat Einat Idan (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

              Dates

                Created:
                Updated:
                Resolved:
                Archived:

                PagerDuty