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

DroolsMVELFactory leaks memory in previousDeclarationsObjectCache field using "from" DRL construct

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 5.0.1.FINAL
    • drools-core (expert)
    • None

      When using the DRL construct to extract variables using a "from" clause, a FromNode is created which extracts data using an instance of DroolsMVELFactory paired with MVELDataProvider. After processing of rule agenda items, many of these nodes can exist and hold onto memory due to the snapshot of data processed during DroolsMVELFactory.setContext(), called from MVELDataProvider.getResults(). The snapshotting of state is held in (HashMap) previousDeclarationsObjectCache of DroolsMVELFactory.

      Suggest that during MVELDataProvider.getResults() call clear on the DroolsMVELFactory after obtaining the results. The clear method could clear out previousDeclarationsObjectCache, which is used during the processing of the MVEL expression.

      In my application, much data held from these nodes kept instances of data in memory, even though the data was never asserted into working memory.

              mproctor@redhat.com Mark Proctor
              kwesterfeld_jira Kurt Westerfeld (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

                Created:
                Updated:
                Resolved:
                Archived: