Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-51

lost objects

    XMLWordPrintableJSON

    Details

    • Type: Question
    • Status: Closed
    • Priority: Blocker
    • Resolution: Invalid
    • Affects Version/s: jcs-1.3
    • Fix Version/s: jcs-1.3
    • Component/s: Indexed Disk Cache
    • Labels:
      None
    • Environment:
      java 6 , windows xp

      Description

      We will use JCS to create a large number of (large) objects on disk with a smal javaheap size. So I set MaxPurgatorySize=100 and wrote 100000 objects to the cache

      id is the counter of the for loop as String.

      jcs.putInGroup(id,"aGroup",object);

      After this, I tried to read this objects, in an other loop

      final int x = (int) (100000*Math.random());

      jcs.getFromGroup( "" + x , "aGroup").

      get FromGroup will return null in 50% of the cases. What is going wrong?!

      I get the cache using

      jcs = JCS.getInstance("myRegion1");

      I can't increase MaxPurgatorySize=100, because we will work (test working) with a minimum of java heapsize.

      Here is my configuration:

      #############################################################

              1. Default Region Configuration
                jcs.default=DC
                jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
                jcs.default.cacheattributes.MaxObjects=100
                jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
                jcs.default.cacheattributes.UseMemoryShrinker=false
                jcs.default.cacheattributes.ShrinkerIntervalSeconds=60

      ##############################################################

              1. CACHE REGIONS
                jcs.region.myRegion1=DC
                jcs.region.myRegion1.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
                jcs.region.myRegion1.cacheattributes.MaxObjects=1000000
                jcs.region.myRegion1.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
                jcs.region.myRegion1.cacheattributes.DiskUsagePattern=UPDATE
                ##############################################################
              2. AUXILIARY CACHES
      1. Indexed Disk Cache
        jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
        jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
        jcs.auxiliary.DC.attributes.DiskPath=dump
        jcs.auxiliary.DC.attributes.MaxPurgatorySize=100
        jcs.auxiliary.DC.attributes.MaxKeySize=-1
        jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=3000000
        jcs.auxiliary.DC.attributes.OptimizeOnShutdown=true
        jcs.auxiliary.DC.attributes.MaxRecycleBinSize=7500

        Attachments

          Activity

            People

            • Assignee:
              asmuts Aaron Smuts
              Reporter:
              mquasten Manfred Quasten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: