Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4222

UtilCache has memory leak if many temporary caches are created

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Trunk, Upcoming Branch
    • None
    • framework
    • Bug Crush Event - 21/2/2015

    Description

      Since some time UtilCache has been updated to replace the WeakHashMap by a ConcurrentHashMap:
      private static final ConcurrentHashMap<String, UtilCache<?, ?>> utilCacheTable = new ConcurrentHashMap<String, UtilCache<?, ?>>();

      I think this fix to concurrency issues has introduced a memory leak or at least a much bigger impact on Memory.
      Indeed descendent of AbstractCache (particularly AbstractEntityConditionCache, EntityListCache) tend to create many caches that do not need to always persist in time.

      The old WeakHashMap handled this by enabling them to disappear while today the Hard ref disables this.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            doogie Adam Heath
            p.mouawad@ubik-ingenierie.com Philippe Mouawad

            Dates

              Created:
              Updated:

              Agile

                Completed Sprint:
                Bug Crush Event - 21/2/2015 ended 26/Feb/15
                View on Board

                Slack

                  Issue deployment