ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Scherbakov (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (IGNITE-3134) Unexpected EVT_CACHE_ENTRY_EVICTED events in OFFHEAP_TIERED mode
Date Fri, 13 May 2016 15:16:12 GMT

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

Alexei Scherbakov reassigned IGNITE-3134:
-----------------------------------------

    Assignee: Alexei Scherbakov

> Unexpected EVT_CACHE_ENTRY_EVICTED events in OFFHEAP_TIERED mode
> ----------------------------------------------------------------
>
>                 Key: IGNITE-3134
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3134
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: Alexei Scherbakov
>            Assignee: Alexei Scherbakov
>             Fix For: 1.7
>
>
> EVT_CACHE_ENTRY_EVICTED event is triggered on any cache operation in this mode.
> Code sample:
> {code}
> IgnitePredicate<CacheEvent> lsnr = new IgnitePredicate<CacheEvent>() {
>         @Override public boolean apply(CacheEvent evt) {
>                     counter.incrementAndGet();
>                     return true; // Return true to continue listening.
>         }
> };
> CacheConfiguration<Object, Object> cfg = new CacheConfiguration<>();
> cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
> cfg.setEvictionPolicy(new FifoEvictionPolicy<>(1));
> IgniteCache<Object, Object> test = ignite.getOrCreateCache(cfg);
> // Register event listener for all local task execution events.
> ignite.events().localListen(lsnr, EVT_CACHE_ENTRY_EVICTED);
> test.put("1", "1");
> test.put("2", "2");
> test.put("3", "3");
> Object o = test.get("2");
> System.out.println(counter.get());
> {code}
> will print 4



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

Mime
View raw message