[ 
https://issues.apache.org/jira/browse/GEODE-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15300436#comment-15300436
 ] 

ASF subversion and git services commented on GEODE-1428:
--------------------------------------------------------

Commit fa6e722e727a6f40788014aa6cac17890f6a64c9 in incubator-geode's branch 
refs/heads/develop from [~dschneider]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=fa6e722 ]

GEODE-1428: deliver event synchronously if it is rejected

Changed unit test to use close instead of emergencyClose.
Doing this caused an event to be sent after the async thread
pool was shutdown which resulted in a suspect warning without
this fix.


> 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
>            Assignee: 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