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

The commons.opennlp module can load the same model twice in parallel

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.12.0
    • 1.0.0, 0.12.1
    • None
    • None

    Description

      The commons.opennlp model allows to load models by their names via the DataFileProvider infrastructure. Loaded models are cached in memory.

      If two components do request the same model in a short time. Especially when the 2md request for a model comes before the first was completed the same model is loaded twice in parallel. This will result that two instances of the model are loaded.

      While the 2nd request will override the cached model of the first the first component requesting the model might still hold a reference. In this case two instances of the model are holded in-memory.

      To solve those situations the OpenNLP service needs to use lock while loading models.

      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:

              Slack

                Issue deployment