Here are the configurations

DataRegionConfiguration =
    (new DataRegionConfiguration)
      .setName("RefData")
      .setInitialSize(21 * 1024 * 1024)
      .setMaxSize(21 * 1024 * 1024)
      .setPersistenceEnabled(false)
      .setPageEvictionMode(DataPageEvictionMode.RANDOM_LRU)
      .setMetricsEnabled(true)
      .setEvictionThreshold(.9)

I then created a cache that uses that data region.

      val cfg = new CacheConfiguration[Int, String]
      cfg.setName("testCache")
      .setCacheMode(CacheMode.PARTITIONED)
      .setAtomicityMode(CacheAtomicityMode.ATOMIC)
      .setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(Durati
on.ETERNAL))
// .setIndexedTypes(keytag.runtimeClass, valtag.runtimeClass) uncommenting
this causes the error
      .setDataRegionName("RefData"))
      .setStatisticsEnabled(true)

val cacheFactory = FactoryBuilder.factoryOf("CacheConstantString")
cfg.setCacheStoreFactory(cacheFactory)
  .setReadThrough(readThrough)

       val myCache = ignite.getOrCreateCache(cfg)

// This is my stubbed read through
class CacheConstantString[K,V] extends CacheStoreAdapter[K, V]  with
Logging {
  override def load(key: K): V = {
    "foo".asInstanceOf[V]
  }
}

It is the combination of both cache enabled and setting indexed types that
is the problem, it works fine without either, but I need the read through.
I never see any value in the metrics except evicts=0 and I know it must be
evicting pages because i am writing 35,000 keys into a data region that
only has enough space for 8000 or so.  This is a cache metric, is it
showing page evicts or key evicts?   Because I have an expiry of Eternal,
so I dont expect to see key evicts


On Thu, Jan 11, 2018 at 8:40 AM, Alexey Popov <[email protected]> wrote:

> Hi,
>
> Can you share your configuration for
> 1) cache
> 2) memory region?
>
> I see "evicts=0" in your stats that looks very strange. Are you sure you
> have a configured eviction policy in the data region (policyName=RefData)?
>
> Does this cache work fine (evicts some data) without Cache Store enabled?
>
> Thank you,
> Alexey
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Reply via email to