[ https://issues.apache.org/jira/browse/IGNITE-13010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144909#comment-17144909 ]
Denis Garus commented on IGNITE-13010: -------------------------------------- [~nizhikov] Thanks for the review. > A local listener for cache events with type EVT_CACHE_STOPPED does not get a > cache event from a remote node. > ------------------------------------------------------------------------------------------------------------ > > Key: IGNITE-13010 > URL: https://issues.apache.org/jira/browse/IGNITE-13010 > Project: Ignite > Issue Type: Bug > Affects Versions: 2.8, 2.8.1 > Reporter: Denis Garus > Assignee: Denis Garus > Priority: Major > Fix For: 2.9 > > Time Spent: 20m > Remaining Estimate: 0h > > A local listener for cache events with type EVT_CACHE_STOPPED does not get a > cache event from a remote node. > That occurs due to NPE on a remote node: > {code:java} > [2020-05-14 > 12:07:25,623][ERROR][sys-#206%security.NpeGridEventConsumeHandlerReproducer2%][GridEventConsumeHandler] > Failed to send event notification to node: > 55671ec1-dad9-452b-8ab2-4b7916c00000[2020-05-14 > 12:07:25,623][ERROR][sys-#206%security.NpeGridEventConsumeHandlerReproducer2%][GridEventConsumeHandler] > Failed to send event notification to node: > 55671ec1-dad9-452b-8ab2-4b7916c00000java.lang.NullPointerException at > org.apache.ignite.internal.GridEventConsumeHandler$2$1.run(GridEventConsumeHandler.java:238) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > at java.base/java.lang.Thread.run(Thread.java:834) > {code} > The reproducer: > {code:java} > public class NpeGridEventConsumeHandlerReproducer extends > GridCommonAbstractTest { > private static AtomicInteger rmtCounter = new AtomicInteger(); > private static AtomicInteger locCounter = new AtomicInteger(); > @Override protected IgniteConfiguration getConfiguration(String > igniteInstanceName) throws Exception { > return > super.getConfiguration(igniteInstanceName).setIncludeEventTypes(EVT_CACHE_STOPPED); > } > @Test > public void test() throws Exception { > startGrids(3); > > grid(1).createCache(new CacheConfiguration<>("test_cache")); > grid(0).events().remoteListen((uuid, evt) ->{ > locCounter.incrementAndGet(); > return true; > }, evt->{ > rmtCounter.incrementAndGet(); > return true; > }, EVT_CACHE_STOPPED); > grid(1).destroyCache("test_cache"); > TimeUnit.SECONDS.sleep(10); > assertEquals(rmtCounter.get(), locCounter.get()); > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)