Hi

I've tested some cache configurations with eviction policy and found a bit
strange behavior.

For instance the cache configuration is following and I want to have only
50 recent entries in cache (swap is disabled):

<bean class="org.apache.ignite.configuration.CacheConfiguration">
    <property name="name"
value="cache_0001-ATOMIC-B2-PART-FIFO-OFF_VAL-OFFMAX_1024Lx1024L"/>
    <property name="atomicityMode" value="ATOMIC"/>
    <property name="backups" value="2"/>
    <property name="cacheMode" value="PARTITIONED"/>
    <property name="evictionPolicy">
        <bean
class="org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy">
            <property name="maxSize" value="50"/>
        </bean>
    </property>
    <property name="memoryMode" value="OFFHEAP_VALUES"/>
    <property name="offHeapMaxMemory" value="#{1024L*1024L}"/>
</bean>

1. I start 2 data nodes and a client node.
2. The client makes 60 puts (Int, String)
3. The client makes 60 gets for keys from the previous step and got only 40
entries. 20 first entries have been evicted.


I repeated the scenario above for various cache configurations (changing
options: writeSynchronizedMode, atomicityMode, rebalanceMode, cacheMode)
and found that the issue occurs only for atomic caches with
writeSynchronizedMode=ASYNC|PRIMARY_SYNC
Eviction for TX caches and for ATOMIC with writeSynchronizedMode=FULL_SYNC
works fine (always evicted 10 entries)

Could someone take a look and explain such behavior?

-- 
Sergey Kozlov

Reply via email to