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

Alexey Kuznetsov edited comment on IGNITE-2552 at 2/14/17 3:47 PM:
-------------------------------------------------------------------

[~dmagda] what if user sets them both, and wants them to work together? 
Shouldn't the eviction policy take both values into account? I would suggest 
solution as following : if user sets them both then policy process them both, 
else if user set one - then processed would be the only one.

BTW, this ticket covers only main 4 eviction policies(Fifo, Random, Lru , 
Sorted), isn't it ? 
What if max entries was changed explicitly and after a while we decided 
eviction policy must ignore max entries and take max size into account ? 

Now we've got the following eviction policy logic(shrink() causes entry 
eviction):
{quote}
    protected void shrink() {
        long maxMem = this.maxMemSize;

        if (maxMem > 0) {........}
{quote}
If maxMemSize was not set explicitly , it will remain zero and will not be 
considered. So what is this ticket about ?  


was (Author: alexey kuznetsov):
[~dmagda] what if user sets them both, and wants them to work together? 
Shouldn't the eviction policy take both values into account? I would suggest 
solution as following : if user sets them both then policy process them both, 
else if user set one - then processed would be the only one.

BTW, this ticket covers only main 4 eviction policies(Fifo, Random, Lru , 
Sorted), isn't it ? 
What if max entries was changed explicitly and after a while we decided 
eviction policy must ignore max entries and take max size into account ? 

Now we've got the following 
{quote}
    protected void shrink() {
        long maxMem = this.maxMemSize;

        if (maxMem > 0) {
{quote}

> Eviction policy must consider either max size or max entries count
> ------------------------------------------------------------------
>
>                 Key: IGNITE-2552
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2552
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 1.5.0.final
>            Reporter: Denis Magda
>            Assignee: Alexey Kuznetsov
>            Priority: Minor
>             Fix For: 2.0
>
>
> Presently both max size and max entries number are considered by eviction 
> policy logic even if the only one is set by user explicitly.
> This behavior must be reworked in a way that if one of the parameters is set 
> explicitly then only it will be used by eviction policy while the other one 
> will be ignored.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to