You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Shtykh (JIRA)" <ji...@apache.org> on 2016/01/15 08:33:40 UTC

[jira] [Commented] (IGNITE-2389) Need to add ability to swap the queue if it's too long

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

Roman Shtykh commented on IGNITE-2389:
--------------------------------------

Context: http://apache-ignite-users.70518.x6.nabble.com/Stupide-question-about-Queue-td2557.html

> Need to add ability to swap the queue if it's too long
> ------------------------------------------------------
>
>                 Key: IGNITE-2389
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2389
>             Project: Ignite
>          Issue Type: Improvement
>          Components: data structures
>            Reporter: Valentin Kulichenko
>             Fix For: 1.6
>
>
> In some cases there can be a requirement to start swapping new queue elements to avoid out of memory errors. For example, if the consumer temporarily stopped for some reason, but the producer still adds elements.
> We can do this based on cache swap space and evictions. I think we should:
> # Add max allowed in-memory elements property to {{CollectionConfiguration}}. We can also support limit by memory size.
> # Implement special eviction policy that will evict new queue elements if limits are reached.
> # Automatically unswap latest elements when consumer resumes polling (can be achieved by a background process).
> In case of {{IgniteSet}}, limits should be also honored, but here we don't have ordering. So I think we can use our standard LRU, but make sure that only elements are swapped. Header and other meta objects should be always in memory.



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