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

ASF GitHub Bot commented on GEODE-2109:
---------------------------------------

GitHub user deepakddixit opened a pull request:

    https://github.com/apache/incubator-geode/pull/296

    GEODE-2109 : Calling submit on ExecutionService can cause exceptions to be 
lost

    Replaced submit call with execute.
    Refactored GIITask calls from DiskStoreImpl. Async task like Creating KRF's 
through disk store are replaced with execute. The other call is kept with 
submit as we later check for whether delayed write is completed or not.
    Added RejectedExecutionException to IgnoredException list as from these 
tests it may get occasionally thrown and as we moved to execute method of 
ExecutorService they will be logged.
    
    All precheckin tests are passing except one 
org.apache.geode.management.internal.cli.commands.IndexCommandsDUnitTest.testCreateDestroyUpdatesSharedConfig
 which is marked as Flaky.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/deepakddixit/incubator-geode bugfix/GEODE-2109

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-geode/pull/296.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #296
    
----
commit 8c4aeaae23d242b9a4edfe328bd4046e5626914d
Author: Deepak Dixit <[email protected]>
Date:   2016-11-23T16:03:14Z

    GEODE-2109: Replacing ExecutorService.submit calls with 
ExecutorService.execute call.
    This will help in logging exceptions those come in the thread.

commit db213bb1d0982db12ffc5e8d2649cec8f69147c6
Author: Deepak Dixit <[email protected]>
Date:   2016-11-24T06:27:58Z

     GEODE-2109: Replacing ExecutorService.submit calls with 
ExecutorService.execute call for DiskStoreTask.
    
    Refactored DiskStore task for delayed writes, we cannot replace expensive 
writes tasks submit call with execute as later we check if write call is 
completed or not.
     Replaced submit call by execute in case of DiskStore tasks like 
compactions, creating KRF's.

commit 478a714979ace2f187ebf336c0d5121a0a5c8940
Author: Deepak Dixit <[email protected]>
Date:   2016-11-24T12:21:54Z

     GEODE-2109: Replacing ExecutorService.submit calls with 
ExecutorService.execute call for DiskStoreTask.
    
    Replaced submit call for GIITask and RemoveMember tasks. GIITask is used 
when adding member or starting managing activity when node becomes managing 
node. While adding member we can make the ExecutorService.execute call. Not 
changed call for GIITask when invoked from managing activity as possible 
exception is handled.

commit b501654a3718f3e15cc45b9bd757bfb558f664a1
Author: Deepak Dixit <[email protected]>
Date:   2016-11-24T16:27:38Z

     GEODE-2109: Replacing ExecutorService.submit calls with 
ExecutorService.execute call for DiskStoreTask.
    Ignoring rejectedException as this can be thrown in case pool is shutting 
down.

commit 9e56037ac21768adde9c35c97bc8e0cb463042b7
Author: Deepak Dixit <[email protected]>
Date:   2016-11-24T17:17:53Z

     GEODE-2109: Replacing ExecutorService.submit calls with 
ExecutorService.execute call for DiskStoreTask.
    Changing way creating GIITask when node becomes managing node.

commit 3b8273b7746f5b4af329c92c92fac07e6571cf05
Author: Deepak Dixit <[email protected]>
Date:   2016-11-25T05:15:26Z

     GEODE-2109: Replacing ExecutorService.submit calls with 
ExecutorService.execute call for DiskStoreTask.
    Adding ignoredException for MemoryThresholdsDUnitTest.

commit 5cf0aac229c595b91436c4d327d43444120698b5
Author: Deepak Dixit <[email protected]>
Date:   2016-11-25T08:05:39Z

     GEODE-2109: Replacing ExecutorService.submit calls with 
ExecutorService.execute call for DiskStoreTask.
    Adding ignoredException for EvictionStatsDUnitTest.

commit ed24011d0b1456b0247bd0254af252cae351eb07
Author: Deepak Dixit <[email protected]>
Date:   2016-11-26T04:02:26Z

     GEODE-2109: Replacing ExecutorService.submit calls with 
ExecutorService.execute call for DiskStoreTask.
    Applying spotless checks.

----


> calling submit on ExecutionService can cause exceptions to be lost
> ------------------------------------------------------------------
>
>                 Key: GEODE-2109
>                 URL: https://issues.apache.org/jira/browse/GEODE-2109
>             Project: Geode
>          Issue Type: Bug
>          Components: regions
>            Reporter: Darrel Schneider
>
> Geode has a number of places that call submit on ExecutionService. The submit 
> method returns a Future object. If the caller makes sure it calls "get" on 
> the Future then all is well. But in many places geode is not calling get. In 
> that case if the Runnable that was submitted throws an exception it gets 
> stored in the get and never logged. This can make it very hard to diagnose 
> problems.
> If the caller does not want to call get on the returned Future then it should 
> instead call the "execute" method. In that case the exception will be 
> unhandled and the unhandled exception handler code we have on the 
> LoggingThreadGroup class will cause the exception to be logged.
> Here are the places that should be changed to use execute instead of submit:
> org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.clear()
> org.apache.geode.internal.cache.DiskStoreImpl.executeDiskStoreTask(Runnable)
> org.apache.geode.internal.cache.lru.HeapEvictor.onEvent(MemoryEvent)
> org.apache.geode.distributed.internal.InternalLocator.restartWithDS(InternalDistributedSystem,
>  GemFireCacheImpl)
> org.apache.geode.distributed.internal.FunctionExecutionPooledExecutor.FunctionExecutionPooledExecutor(BlockingQueue<Runnable>,
>  int, PoolStatHelper, ThreadFactory, int, boolean)
> org.apache.geode.internal.cache.PRHARedundancyProvider.scheduleCreateMissingBuckets()
> org.apache.geode.distributed.internal.InternalLocator.startSharedConfigurationService(GemFireCacheImpl)
> org.apache.geode.cache.client.internal.SingleHopClientExecutor.submitTask(Runnable)
> org.apache.geode.management.internal.FederatingManager.submitTask(Callable<DistributedMember>)



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

Reply via email to