lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4163) Improve concurrency in MMapIndexInput.clone()
Date Fri, 22 Jun 2012 09:17:43 GMT


Adrien Grand commented on LUCENE-4163:


Maybe we should also update {{WeakIdentityMap}} documentation now that it has key and value

bq. This implementation was forked from <a href="">Apache CXF</a>
but modified to <b>not</b> implement the {@link java.util.Map} interface and without
any set/iterator views on it, as those are error-prone and inefficient
> Improve concurrency in MMapIndexInput.clone()
> ---------------------------------------------
>                 Key: LUCENE-4163
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/store
>    Affects Versions: 3.6, 4.0, 5.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.0, 3.6.1, 5.0
>         Attachments: LUCENE-4163.patch, LUCENE-4163.patch
> Followup issue from SOLR-3566:
> Whenever you clone the TermIndex, it also creates a clone of the underlying IndexInputs.
In high cocurrent environments, the clone method of MMapIndexInput is a bottleneck (it has
heavy work to do to manage the weak references in a synchronized block).
> Everywhere else in Lucene we use my new WeakIdentityMap for managing concurrent weak
maps. For this case I did not do this, as the WeakIdentityMap has no iterators (it doe snot
implement Map interface). This issue will add a key and values iterator (the key iterator
will not return GC'ed keys), so MMapIndexInput can use WeakIdentityMap backed by ConcurrentHashMap
and needs no synchronization. ConcurrentHashMap has better concurrency because it distributes
the hash keys in different buckets per thread.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message