Lucene - Core
  1. Lucene - Core
  2. LUCENE-3656

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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

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

        Activity

        Uwe Schindler created issue -
        Uwe Schindler made changes -
        Field Original Value New Value
        Labels curiosity
        Uwe Schindler made changes -
        Attachment LUCENE-3656.patch [ 12507916 ]
        Uwe Schindler made changes -
        Attachment LUCENE-3656.patch [ 12508104 ]
        Uwe Schindler made changes -
        Fix Version/s 3.6 [ 12319070 ]
        Fix Version/s 4.0 [ 12314025 ]
        Uwe Schindler made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development