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

Earwin Burrfoot commented on LUCENE-3092:
-----------------------------------------

bq. but I couldn't disagree more that this is an issue with an Event model
There are no issues with event model itself. It's just that this model is badly 
suitable for this issue's usecase.
Event listeners are good. Using them to emulate what is essentially a mutex - 
is ugly and fragile as hell.

bq. We have a series of components in Lucene; Directories, IndexWriter, 
MergeScheduler etc, and we have some crosscutting concerns such as merges 
themselves.
My point is that for many concerns they shouldn't necessarily be crosscutting.
Eg - Directory can support IO priorities/throttling, so it doesn't have to know 
about merges or flushes.
Many OSes have have special APIs that allow IO prioritization, do they know 
about merges, or Lucene at all? No.

> NRTCachingDirectory, to buffer small segments in a RAMDir
> ---------------------------------------------------------
>
>                 Key: LUCENE-3092
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3092
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Store
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 3.2, 4.0
>
>         Attachments: LUCENE-3092-listener.patch, LUCENE-3092.patch
>
>
> I created this simply Directory impl, whose goal is reduce IO
> contention in a frequent reopen NRT use case.
> The idea is, when reopening quickly, but not indexing that much
> content, you wind up with many small files created with time, that can
> possibly stress the IO system eg if merges, searching are also
> fighting for IO.
> So, NRTCachingDirectory puts these newly created files into a RAMDir,
> and only when they are merged into a too-large segment, does it then
> write-through to the real (delegate) directory.
> This lets you spend some RAM to reduce I0.

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