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

TaxonomyWriter parents array creation is not thread safe, can cause NPE

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.5, 4.0-ALPHA
    • modules/facet
    • None
    • New

    Description

      Following user list thread TaxWriter leakage? it appears that if two threads or more are asking for the parent array for the first time, a context switch after the first thread created the empty parents array but before it initialized it would cause the other array to use an uninitialized array, causing an NPE. Fix is simple: synchronize the method getParentArray()

      Attachments

        1. LUCENE-3484.patch
          3 kB
          Doron Cohen

        Activity

          People

            doronc Doron Cohen
            doronc Doron Cohen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: