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

Jerry Cwiklik closed UIMA-3630.
-------------------------------

    Resolution: Fixed

Misdiagnosed. Code in place seems ok., There should not be a race condition as 
each AE is initialized sequentially. 

> Fix UIMA-AS race condition in JmsAnalysisEngineServiceStub
> ----------------------------------------------------------
>
>                 Key: UIMA-3630
>                 URL: https://issues.apache.org/jira/browse/UIMA-3630
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>    Affects Versions: 2.4.2AS
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>             Fix For: 2.5.0AS
>
>
> There is a race condition in the JmsAnalysisEngineServiceStub related to a 
> recent code change where there is a single instance of uima-as client per 
> jvm. All threads share this instance now.
> The race happens when the process starts up. One thread is initializing 
> uima-as client which takes some time. The code creates an instance of uima-as 
> client, places it in Map under broker url key and begins initializing the 
> client. Another thread checks if there is a instance of a client for a giving 
> key, finds it and proceeds to calling sendAndReceive().
> Since the client is still initializing, the sendAndReceive() throws Not Ready 
> exception.
> Add CountDownLatch to prevent threads from calling sendAndReceive() until the 
> uima-as client initializes (latch down)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to