Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-3844

OffHeap region close could be more efficient in its memory usage.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • offheap
    • None

    Description

      Close on OffHeap region tries to copy OffHeap RegionEnties into array, which could take up lot of memory based on the region size.
      This could be optimized by working on the region map itself or by working on the entries per hashmap segment one at a time.

      java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOf(Arrays.java:3181)
      at java.util.ArrayList.grow(ArrayList.java:261)
      at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:235)
      at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:227)
      at java.util.ArrayList.add(ArrayList.java:458)
      at org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap$Segment.clear(CustomEntryConcurrentHashMap.java:1037)
      at org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.clear(CustomEntryConcurrentHashMap.java:1795)
      at org.apache.geode.internal.cache.AbstractRegionMap._mapClear(AbstractRegionMap.java:329)
      at org.apache.geode.internal.cache.AbstractRegionMap.clear(AbstractRegionMap.java:371)
      at org.apache.geode.internal.cache.AbstractLRURegionMap.clear(AbstractLRURegionMap.java:685)
      at org.apache.geode.internal.cache.AbstractRegionMap.close(AbstractRegionMap.java:337)
      at org.apache.geode.internal.cache.LocalRegion.closeEntries(LocalRegion.java:2703)
      at org.apache.geode.internal.cache.LocalRegion.recursiveDestroyRegion(LocalRegion.java:2664)
      at org.apache.geode.internal.cache.LocalRegion.basicDestroyRegion(LocalRegion.java:6184)
      at org.apache.geode.internal.cache.DistributedRegion.basicDestroyRegion(DistributedRegion.java:1707)
      at org.apache.geode.internal.cache.LocalRegion.close(LocalRegion.java:2206)

      Attachments

        Activity

          People

            Unassigned Unassigned
            agingade Anilkumar Gingade
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: