[
https://issues.apache.org/jira/browse/LUCENE-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965130#action_12965130
]
Shai Erera commented on LUCENE-2779:
------------------------------------
bq. Doesn't look like a really important patch, that just has to be backported.
Earwin, I did not *just* backport it. This time I deviated from my usual work
habit, which is changing 3x before trunk, because I did want to cause any
mergeprops troubles. But in real life, I work on and improve 3x, and
back/forward port to trunk -- at least until trunk/4.0 release will be anywhere
near sight. So for all intent and purposes, this improvement should have gone
into 3x, as far as I'm concerned. That that we have an issue w/ our backwards
tests layer (sent a separate email about it) is unrelated to the issue.
As a general practice though, I do not neglect 3x branch -- if something that I
do can fit there, I will put it there, whether it's a major performance
improvement, or a minor house cleaning.
> 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: [email protected]
For additional commands, e-mail: [email protected]