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

Michael McCandless commented on LUCENE-3416:
--------------------------------------------

I made setMaxMergeWriteMBPerSec sync'd because ie has tricky logic about 
creating a new RateLimiter or reusing an existing one (so current merges can 
see the change on a "best effort" basis) or clearing the current one... so I 
just wanted to be safe and have only one thread doing this at once; else eg you 
could get NPE I think.

But, probably we should in fact make mergeWriteRateLimiter volatile, just to 
make sure the unsync'd read sees the current value?  The minor added read cost 
should be negligible vs the overhead of creating / writing / closing files.

> Allow to pass an instance of RateLimiter to FSDirectory allowing to rate 
> limit merge IO across several directories / instances
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3416
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3416
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/store
>            Reporter: Shay Banon
>            Assignee: Simon Willnauer
>         Attachments: LUCENE-3416.patch
>
>
> This can come in handy when running several Lucene indices in the same VM, 
> and wishing to rate limit merge across all of them.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to