You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (Created) (JIRA)" <ji...@apache.org> on 2011/12/19 15:43:30 UTC

[jira] [Created] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

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

                 Key: LUCENE-3656
                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
             Project: Lucene - Java
          Issue Type: Bug
          Components: core/index
    Affects Versions: 3.5, 4.0
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler
            Priority: Minor


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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173075#comment-13173075 ] 

Uwe Schindler commented on LUCENE-3656:
---------------------------------------

Any comments about my explanation to still use LHM, otherwise I will commit this in the evening?
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>         Attachments: LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172366#comment-13172366 ] 

Uwe Schindler commented on LUCENE-3656:
---------------------------------------

One more thing, because Robert reminded me:
I changed to use a LinkedHashSet instead simple HashSet, because the caller adding listeners would expect that they are called in order on close. Adding them to a HashSet makes they executed in arbitrary order and thats not what a user expects. The Linked* does not cost us much, as the number of listeners should be low :-)
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>         Attachments: LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Uwe Schindler (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-3656:
----------------------------------

    Attachment: LUCENE-3656.patch

Simple refactorings to make the code in IR and SCR/SR similar.

Will commit this now.
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3656.patch, LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Uwe Schindler (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-3656:
----------------------------------

    Fix Version/s: 4.0
                   3.6
    
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3656.patch, LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Simon Willnauer (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172581#comment-13172581 ] 

Simon Willnauer commented on LUCENE-3656:
-----------------------------------------

Uwe, this seems a pretty good usecase for CopyOnWriteArraySet. No sync but thread-safe and reasonably cheap.
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>         Attachments: LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172609#comment-13172609 ] 

Uwe Schindler commented on LUCENE-3656:
---------------------------------------

I agree that for small ordered sets (like Handlers/Listender, see example from Javadocs) this is a good idea, but its still the wrong set for this use case:

The listeners on close are registered by code that *may* (unlikely) come from different threads (e.g. FieldCacheImpl registers an event to purge the caches on IndexReader close, or maybe in future Solr registers a handler - this is generally done on setup of IndexReader). In general synchronization would not really be required at all, but as also different threads *may* register listeners, there should be some basic synchronization. If you would use CopyOnWriteArraySet, registering/removing new listeners gets slow, as it has to copy the array each time, so registering event handlers will not block but just be slow. On the other hand we have very fast access just for exactly one single iteration on thi set (when the listeners are triggered, on closing the reader). We get this for free without sync, but who cares, IndexReader.close() is the last operation on an IR where you have no concurrency anymore.

I think we should stay with a simply synchronized LinkedHashSet which is cheap as concurrency is no issue at all (not many threads will ever register an event, the whole synchronization is just to guard the set for concurrent modifications (e.g. if two threads create a new FieldCache entry at same time). The addition cost for sync on IR.close() is a no-op, as explained above (no concurrecy anymore).
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>         Attachments: LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Uwe Schindler (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler resolved LUCENE-3656.
-----------------------------------

    Resolution: Fixed

Committed trunk revision: 1221369
Merged 3.x revision: 1221371
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3656.patch, LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Michael McCandless (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173123#comment-13173123 ] 

Michael McCandless commented on LUCENE-3656:
--------------------------------------------

bq. I think we should stay with a simply synchronized LinkedHashSet

+1
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>         Attachments: LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Michael McCandless (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172344#comment-13172344 ] 

Michael McCandless commented on LUCENE-3656:
--------------------------------------------

+1
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Uwe Schindler (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-3656:
----------------------------------

    Attachment: LUCENE-3656.patch

Simple patch.

I had to add some additional synchronization in the notifier, as the iterators are not thread-safe. Collections.synchronized*() returns a set, thats synced on itsself, so you can for more complex changes like iteration, sync on the result (the Set itsself), see for complete explanation: [http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Collections.html#synchronizedSet(java.util.Set)]
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>         Attachments: LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173211#comment-13173211 ] 

Robert Muir commented on LUCENE-3656:
-------------------------------------

+1, its the right data structure here.
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>         Attachments: LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Yonik Seeley (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172588#comment-13172588 ] 

Yonik Seeley commented on LUCENE-3656:
--------------------------------------

bq. this seems a pretty good usecase for CopyOnWriteArraySet.

+1, good call.
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: curiosity
>         Attachments: LUCENE-3656.patch
>
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3656) IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set

Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172320#comment-13172320 ] 

Robert Muir commented on LUCENE-3656:
-------------------------------------

+1
                
> IndexReader's add/removeCloseListener should not use ConcurrentHashMap, just a synchronized set
> -----------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3656
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.5, 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>
> 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 :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org