Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-903

NLPEngineHelper does not obtain wirte lock when creating an AnalyzedText ContentPart in the initAnalyzedText utility method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • enhancer-0.10.0
    • Enhancer
    • None

    Description

      As the title says the #initAnalyzedText(ContentItem ci) method in the NlpEngineHelper utility (o.a.s.enhancer.nlp module) does not use a write lock when creating the content part.

      Using a read lock for checking if the AnalysedText content part exists is fine, but it is not yet created a write lock needs to be obtained to avoid creating multiple AnalysedText content parts.

      Users affected by this will notice IllegalStateExceptions with the message that the AnalyzedText content part is already present. Also check that the "NlpEngineHelper#initAnalysedText(...)" is mentioned in the Stacktrace as this Exception may also originate from direct calls to AnalysedTextFactory#createAnalysedText(..)"

      Attachments

        Activity

          People

            rwesten Rupert Westenthaler
            rwesten Rupert Westenthaler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: