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

IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5, 4.0-ALPHA
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
    • Lucene Fields:
      New

      Description

      The use-case for ConcurrentHashMap is when many threads are reading and less writing to the structure. Here this is just funny: The only reader is close(). Here you can just use a synchronized HashSet. The complexity of CHM is making this just a joke

        Attachments

        1. LUCENE-3656.patch
          5 kB
          Uwe Schindler
        2. LUCENE-3656.patch
          3 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              thetaphi Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: