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

Fix UIMA-AS race condition in JmsAnalysisEngineServiceStub

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.2AS
    • Fix Version/s: 2.6.0AS
    • Component/s: Async Scaleout
    • Labels:
      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

            • Assignee:
              cwiklik Jerry Cwiklik
              Reporter:
              cwiklik Jerry Cwiklik
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: