ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Gura (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-1380) Random eviction policy for near cache works incorrectly
Date Thu, 29 Oct 2015 18:11:27 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980935#comment-14980935
] 

Andrey Gura commented on IGNITE-1380:
-------------------------------------

There ar two problems in case of near cache:

# {{GridNearCacheAdapter.randomEntry()}} method returns {{GridDhtAtomicCacheEntry}} instance
instead of {{GridNearCacheEntry}}.
# {{RandomEvictionPolicy}} always use {{IgniteCache.localSize(CachePeekMode.ONHEAP)}} call
for size calculation.

PR cretaed: https://github.com/apache/ignite/pull/185

Waiting for TC.

> Random eviction policy for near cache works incorrectly
> -------------------------------------------------------
>
>                 Key: IGNITE-1380
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1380
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: ignite-1.4
>            Reporter: Pavel Konstantinov
>            Assignee: Andrey Gura
>             Fix For: 1.5
>
>
> Start two server nodes with cache with near cache with configuration below (node with
load generation and one more data node).
> Put 2000 keys (from 1 to 2000), read 200 key (from 1 to 200) using first node. 
> {code}
> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>                     <property name="name" value="near-random-100"/>
>                     <property name="cacheMode" value="PARTITIONED"/>
>                     <property name="atomicityMode" value="ATOMIC"/>
>                     <property name="nearConfiguration">
>                         <bean class="org.apache.ignite.configuration.NearCacheConfiguration">
>                             <property name="nearEvictionPolicy">
>                                 <bean class="org.apache.ignite.cache.eviction.random.RandomEvictionPolicy">
>                                     <property name="maxSize" value="100"/>
>                                 </bean>
>                             </property>
>                         </bean>
>                     </property>
>                 </bean>
> {code}
> Near cache contains more keys then I set in configuration (maxSize=100).
> Others eviction policies are  works correctly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message