Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-3630

Fix UIMA-AS race condition in JmsAnalysisEngineServiceStub

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.2AS
    • 2.6.0AS
    • Async Scaleout
    • None

    Description

      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)

      Attachments

        Activity

          People

            cwiklik Jaroslaw Cwiklik
            cwiklik Jaroslaw Cwiklik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: