Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-22371

[GSS](7.4.z) WFCORE-5543 - Operation-scoped caching of static module Jandex indices

XMLWordPrintable

      If an installation has multiple deployments and more than one of those deployments declares a dependency on a particular static module with 'annotations="true"', the Jandex indices for resources in such modules are computed multiple times, once per dependent deployment, increasing deployment time and the peak amount of memory needed to process the deployments. We should cache any such indices so they only need to be created once per top-level management operation.

      We should create a Map<String, Set<Index>> and attach it to the executing management OperationContext. The map key is the module identifier. Any OSH that creates a DeploymentUnitService should pass that map to the DUS, which will make it available to DUPs via a deployment unit attachment. The attachment would be a utility object that holds the map and coordinates creation of indices for static modules. CompositeIndexProcessor would use the attachment.

      The utility object should hold a WeakReference to the map, so when the OperationContext's strong ref to the map gets gc'd, the utility object ref can be gc'd as well, avoiding long term retention of potentially large Index objects. The weak ref approach avoids DUPs concurrently handling different deployments needing to coordinate when they are all done with the utility object.

            chaowan@redhat.com Chao Wang
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: