lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2779) Use ConcurrentHashMap in RAMDirectory
Date Mon, 29 Nov 2010 22:39:10 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12964990#action_12964990
] 

Yonik Seeley commented on LUCENE-2779:
--------------------------------------

In Shai's defense, a CHANGES entry for 4.0 is pretty questionable.  It's not going to be a
noticeable enough speedup to call out as an end-user feature.  Any super-expert level people
extending RAMDirectory and accessing the Map directly will get a compile error (a good thing)
and instantly know what's changed.  IMO, this falls into the category of "little internal
cleanup" and people can consult the SVN logs or mailing lists if they wish to know every single
one of them ;-)

> Use ConcurrentHashMap in RAMDirectory
> -------------------------------------
>
>                 Key: LUCENE-2779
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2779
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Store
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2779-backwardsfix.patch, LUCENE-2779.patch, LUCENE-2779.patch,
TestCHM.java
>
>
> RAMDirectory synchronizes on its instance in many places to protect access to map of
RAMFiles, in addition to updating the sizeInBytes member. In many places the sync is done
for 'read' purposes, while only in few places we need 'write' access. This looks like a perfect
use case for ConcurrentHashMap
> Also, syncing around sizeInBytes is unnecessary IMO, since it's an AtomicLong ...
> I'll post a patch shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message