Thanks Andrey for notes! I've file the ticket https://issues.apache.org/jira/browse/IGNITE-1888
On Wed, Nov 11, 2015 at 3:16 PM, Andrey Gura <ag...@gridgain.com> wrote: > Not quite. Actual the following operations sequence lead to this behavior: > > 1. put entries > 2. remove all entries > 3. put entries > > On Wed, Nov 11, 2015 at 2:59 PM, Sergey Kozlov <skoz...@gridgain.com> > wrote: > > > It seems this behavior caused removeAll on empty cache executed before > > puts. > > > > On Wed, Nov 11, 2015 at 1:16 PM, Sergey Kozlov <skoz...@gridgain.com> > > wrote: > > > > > 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 > > > > > > > > > > > > -- > > Sergey Kozlov > > > > > > -- > Andrey Gura > GridGain Systems, Inc. > www.gridgain.com > -- Sergey Kozlov