Darrel Schneider created GEODE-1428:
---------------------------------------

             Summary: Cache close will log a warning and not dispatch the cache 
close event if the sys prop gemfire.Cache.ASYNC_EVENT_LISTENERS is set to true
                 Key: GEODE-1428
                 URL: https://issues.apache.org/jira/browse/GEODE-1428
             Project: Geode
          Issue Type: Bug
          Components: regions
            Reporter: Darrel Schneider


If you enable async cache listeners then during cache close the dispatch of the 
cache close event will be rejected because the pool has already shutdown. The 
code that uses the async pool currently catches RejectedExecutionException and 
logs it. It should instead just do a synchronous invocation of the listener.

Here is the stack you will see:
[warn 2016/05/20 17:16:07.107 PDT <main> tid=0x1] {0} Event not dispatched due 
to rejected execution
java.util.concurrent.RejectedExecutionException: executor has been shutdown
        at 
com.gemstone.gemfire.distributed.internal.PooledExecutorWithDMStats$BufferHandler.rejectedExecution(PooledExecutorWithDMStats.java:220)
        at 
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
        at 
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
        at 
com.gemstone.gemfire.internal.cache.LocalRegion.dispatchListenerEvent(LocalRegion.java:7591)
        at 
com.gemstone.gemfire.internal.cache.LocalRegion.sendPendingRegionDestroyEvents(LocalRegion.java:7850)
        at 
com.gemstone.gemfire.internal.cache.LocalRegion.basicDestroyRegion(LocalRegion.java:6853)
        at 
com.gemstone.gemfire.internal.cache.DistributedRegion.basicDestroyRegion(DistributedRegion.java:1917)
        at 
com.gemstone.gemfire.internal.cache.LocalRegion.handleCacheClose(LocalRegion.java:7934)
        at 
com.gemstone.gemfire.internal.cache.DistributedRegion.handleCacheClose(DistributedRegion.java:2825)
        at 
com.gemstone.gemfire.internal.cache.GemFireCacheImpl.close(GemFireCacheImpl.java:2149)
        at 
com.gemstone.gemfire.internal.cache.GemFireCacheImpl.close(GemFireCacheImpl.java:1856)
        at 
com.gemstone.gemfire.internal.cache.GemFireCacheImpl.close(GemFireCacheImpl.java:1852)




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

Reply via email to