You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (JIRA)" <ji...@apache.org> on 2013/03/19 08:43:14 UTC

[jira] [Resolved] (STANBOL-985) EventJobManager reports a ChainException if executions finish before the main thread starts waiting for completion

     [ https://issues.apache.org/jira/browse/STANBOL-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rupert Westenthaler resolved STANBOL-985.
-----------------------------------------

    Resolution: Fixed

fixed with http://svn.apache.org/r1458167

Also removed old code that where waiting for some time until it got interrupted first because the current code does no longer send those interrupts and second because this branch of the code should not be reachable (unless in case of an unexpected state). Changed the warn message telling users that his indicates a bug to level error. 
                
> EventJobManager reports a ChainException if executions finish before the main thread starts waiting for completion 
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: STANBOL-985
>                 URL: https://issues.apache.org/jira/browse/STANBOL-985
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>    Affects Versions: enhancer-0.10.0
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> The EventJobManager executes enhancement chains by calling engines in different threads. The "main" thread does wait for the completion. A semaphore with a single permit is used for that.
> However the method that waits for the completion has the bug that it does incorrectly return false (has not completed) when the execution of the chain has already finished before the method is called.
> Users affected by this bug will see a ChainException with a message such as 
>       org.apache.stanbol.enhancer.servicesapi.ChainException: Execution timeout after {time}sec (timeout:60sec) for ContentItem <{content-item-uri}>
> where the {time} will be typically less than 1ms.
> To fix this the EnhancementJobHandler.EnhancementJobObserver#waitForCompletion(..) method needs to be adapted to return "true" - completed - also in cases where there is a permit available on the semaphore as this state indicates that the execution has completed before the waitForCompletion(..) was called.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira