[ https://issues.apache.org/jira/browse/IGNITE-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Scherbakov closed IGNITE-3134. ------------------------------------- > 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)