Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4060

DirectoryTaxonomyWriter.addTaxonomies does not work well in a multi-threaded environment

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • 4.0-ALPHA, 3.6.1
    • modules/facet
    • None
    • New, Patch Available

    Description

      DirTaxoWriter.addTaxonomies may lead to a corrupt taxonomy index if addCategory is called in parallel. While reviewing the code, the following changes seemed to be required:

      • Fix the bug
      • Simplify addTaxonomies code – it's very complicated, seems rather inefficient, and seems to take care of more than is needed.
      • The intention to support multiple taxonomies is unclear, especially since FacetsPayloadProcessor can handle only one Directory and one OrdinalMap at a time. So I'd like to change the method to addTaxonomy. I anyway don't see the reason to add multiple taxonomies at once, one can call addTaxonomy several times.

      I will post a patch soon.

      Attachments

        1. LUCENE-4060.patch
          38 kB
          Shai Erera

        Activity

          People

            shaie Shai Erera
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: