You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexei Scherbakov (JIRA)" <ji...@apache.org> on 2016/05/13 15:16:12 UTC
[jira] [Assigned] (IGNITE-3134) Unexpected EVT_CACHE_ENTRY_EVICTED
events in OFFHEAP_TIERED mode
[ 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)