[ 
https://issues.apache.org/jira/browse/IGNITE-3864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Albrecht updated IGNITE-3864:
-----------------------------------
    Description: 
Decreasing the maxMemory Size of the SortedEvicitionPolicy using  
SortedEvicitionPolicy#setMaxMemorySize(long) during runtime results in an empty 
cache after another entry is put into cache.

Tested with the following scenario (see also attached screenshot):

# Initizalize SortedEvicitionPolicy with 
{code}SortedEvictionPolicy evictionPolicy = new 
SortedEvictionPolicy<>(5000000);{code}
# Set {code}evictionPolicy.setMaxMemorySize(2000000){code}
# Put 10000 entries into cache.
# Set {code}evictionPolicy.setMaxMemorySize(1000000){code}
# Put another entry into cache.
-> All cache entries are evicted -> 0 entries are in cache.

Since the method SortedEvictionPolicy.setMaxMemorySize(long) is also exposed 
via the mbean I would expect that decreasing the max memory size should work 
during runtime. (Increasing the max memory size works)

In addition you can see that the CurrentMemory Size read from the 
SortedEvictionPolicy mbean via getCurrentMemorySize doesn't change after 
decreasing the max memory size. Even after all cache entries are evicted and 
the cache is complety empty 

  was:
Decreasing the maxMemory Size of the SortedEvicitionPolicy using  
SortedEvicitionPolicy#setMaxMemorySize(long) during runtime results in an empty 
cache after another entry is put inside.

Tested with the following scenario (see also attached screenshot):

# Initizalize SortedEvicitionPolicy with 
{code}SortedEvictionPolicy evictionPolicy = new 
SortedEvictionPolicy<>(5000000);{code}
# Set {code}evictionPolicy.setMaxMemorySize(2000000){code}
# Put 10000 entries into cache.
# Set {code}evictionPolicy.setMaxMemorySize(1000000){code}
# Put another entry into cache.
-> All cache entries are evicted -> 0 entries are in cache.

Since the method SortedEvictionPolicy.setMaxMemorySize(long) is also exposed 
via the mbean I would expect that decreasing the max memory size should work 
during runtime. (Increasing the max memory size works)

In addition you can see that the CurrentMemory Size read from the 
SortedEvictionPolicy mbean via getCurrentMemorySize doesn't change after 
decreasing the max memory size. Even after all cache entries are evicted and 
the cache is complety empty 


> Decreasing max memory of SortedEvictionPolicy during runtime
> ------------------------------------------------------------
>
>                 Key: IGNITE-3864
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3864
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 1.7
>            Reporter: David Albrecht
>         Attachments: Decrease SortedEvicitionPolicy MaxMemory.png
>
>
> Decreasing the maxMemory Size of the SortedEvicitionPolicy using  
> SortedEvicitionPolicy#setMaxMemorySize(long) during runtime results in an 
> empty cache after another entry is put into cache.
> Tested with the following scenario (see also attached screenshot):
> # Initizalize SortedEvicitionPolicy with 
> {code}SortedEvictionPolicy evictionPolicy = new 
> SortedEvictionPolicy<>(5000000);{code}
> # Set {code}evictionPolicy.setMaxMemorySize(2000000){code}
> # Put 10000 entries into cache.
> # Set {code}evictionPolicy.setMaxMemorySize(1000000){code}
> # Put another entry into cache.
> -> All cache entries are evicted -> 0 entries are in cache.
> Since the method SortedEvictionPolicy.setMaxMemorySize(long) is also exposed 
> via the mbean I would expect that decreasing the max memory size should work 
> during runtime. (Increasing the max memory size works)
> In addition you can see that the CurrentMemory Size read from the 
> SortedEvictionPolicy mbean via getCurrentMemorySize doesn't change after 
> decreasing the max memory size. Even after all cache entries are evicted and 
> the cache is complety empty 



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

Reply via email to