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 07:41:16 UTC

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

Rupert Westenthaler created STANBOL-985:
-------------------------------------------

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