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

[UIMA-AS] fix potential thread safety issue with flow controller code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.2AS
    • 2.3AS
    • Async Scaleout
    • None

    Description

      The general "contract" regarding threading for user-written UIMA components is that components do not have to be written to be thread-safe, or, more precisely, the framework guarantees it will not call an instance of a user-written component class on multiple threads at the same time. See http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.aae.contract_for_annotator_methods

      This is intended to make writing UIMA components by our user community easier, and to eliminate many hard-to-diagnose issues that could occur otherwise.

      The FlowController main object class, the one that is specified in the custom flow control specification for an aggregate, in UIMA-AS, can be (we think, but to be investigated ) be called on multiple threads at the same time, in the current implementation. This Jira is to fix this, by synchronizing on the flow controller object so that users don't have to write thread safe implementations of this class.

      Also, the docs in the above referenced manual should be updated to include the flow controller object in the set of objects where the framework guarantees that instances of this object will not be called on multiple threads at the same time.

      Attachments

        1. uimaj-as-core-UIMA-1149-patch.txt
          15 kB
          Jaroslaw Cwiklik

        Activity

          People

            cwiklik Jaroslaw Cwiklik
            schor Marshall Schor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: