Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
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(..)"