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

Cache entries in heap can exceed max-active-sessions when distributed session manager configured with local, passivating caches

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 7.4.0.GA
    • 7.4.0.Beta
    • Clustering
    • None

    Description

      When the distributed session manager is configured with a local, passivating cache; HttpSessionActivationListener events are triggered from an asynchronous @CacheEntryPassivated event. Unfortunately, since this event is asynchronous, the series of cache lookups that it performs can undo the series of cache evictions happening concurrently. This can result in cache entries being retained in memory that should otherwise have been passivated.

      To fix this, we need to replace the approach used to reconstruct the session for use by the HttpSessionActivationListener.prePassivate(...) events such that is does not require a cache lookup. Eviction of the entries associated with a given session is already achieved via cascading eviction events.
      e.g.
      creation meta data entry eviction event -> access meta data evict -> access meta data eviction event -> session attributes evict, etc.

      We can preserve the event context across events by use of a concurrent map that is shared between session component factories. Event context will be placed in the map on pre-event and removed on post-event. We can then move the activation notification from the session manager itself to the last event listener in the chain of eviction event cascades. This event listener can reconstruct the session from the contexts that were persisted along the way.

      Attachments

        Issue Links

          Activity

            People

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: