Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-868

OOM issue when run concurrent test on GetDescendant, GetTypeFlat, GetTypeTree.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • OpenCMIS 0.12.0
    • OpenCMIS 0.13.0
    • opencmis-client
    • None

    Description

      When I run concurrent test with 100 threads on GetDescendants, GetTypeTree, GetTypeFlat function.

      I found there are many hashtable objects(>500MB) saved in heap after analyzed heap dump. I found there was one line(red line below) in convertTypeDefinition method that chemistry used typeDefinition object as the key of HashMap. However, JAVA does not think 2 typeDefinition objects are same objects although the value of typeDefinition members are same. I debug to this line, the "result" variable always was "null". It made the objectTypecache larger and larger when run concurrent test.

      private ObjectType convertTypeDefinition(TypeDefinition typeDefinition) {
      lock.writeLock().lock();
      try {
      ObjectType result = null;
      if (objectTypeCache == null)

      { objectTypeCache = new IdentityHashMap<TypeDefinition, ObjectType>(); }

      else

      { result = objectTypeCache.get(typeDefinition); }

      if (result == null)

      { result = objectFactory.convertTypeDefinition(typeDefinition); objectTypeCache.put(typeDefinition, result); }

      return result;
      } finally

      { lock.writeLock().unlock(); }

      }

      Attachments

        Activity

          People

            fmui Florian Müller
            wynet321 Yi Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: