lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1516) Integrate IndexReader with IndexWriter
Date Fri, 06 Mar 2009 12:25:56 GMT

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

Michael McCandless commented on LUCENE-1516:
--------------------------------------------

{quote}
TestIndexReader.testDocsOutOfOrderJIRA140 fails because IW.close
isn't called before dir.close. Is this a bug in the unit test?
{quote}
Yes, this looks like a bug in the test.  This also means when we eventually commit this, we'll
have to first fix that bug on the back-compat tests branch.

{quote}
TestIndexWriterDelete.testOperationsOnDiskFull fails with
MockRAMDirectory.close (still open files) because IW.close isn't
called.
{quote}
I don't understand: that test looks like it does call IW.close for all IW's opened?  (It's
a little tricky, because modifier.close gets called the 2nd time the for(int x = 0...) loop
runs).

{quote}
TestIndexWriter.testImmediateDiskFullWithThreads fails because
IW.close fails on the disk full exception. Should IW.closeInternal ->
SegmentReaderPool.close be placed in the finally clause?
{quote}
Does the 2nd call to close (close(false)) also hit an exception?  Perhaps, modify the test
so that if that 2nd close hits an exception, call abort?

It's good that you're down to mainly the exceptions-based test failures... though I think
you should focus more on the bigger structural changes to the approach (eg switching back
to docMap for merging deletes, adding SegmentReaderPool.release, which should write changes
to the dir & calling it from all places that do a .get(), and the other comments above)
before trying to get all tests to pass.

> Integrate IndexReader with IndexWriter 
> ---------------------------------------
>
>                 Key: LUCENE-1516
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1516
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.4
>            Reporter: Jason Rutherglen
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
LUCENE-1516.patch, LUCENE-1516.patch
>
>   Original Estimate: 672h
>  Remaining Estimate: 672h
>
> The current problem is an IndexReader and IndexWriter cannot be open
> at the same time and perform updates as they both require a write
> lock to the index. While methods such as IW.deleteDocuments enables
> deleting from IW, methods such as IR.deleteDocument(int doc) and
> norms updating are not available from IW. This limits the
> capabilities of performing updates to the index dynamically or in
> realtime without closing the IW and opening an IR, deleting or
> updating norms, flushing, then opening the IW again, a process which
> can be detrimental to realtime updates. 
> This patch will expose an IndexWriter.getReader method that returns
> the currently flushed state of the index as a class that implements
> IndexReader. The new IR implementation will differ from existing IR
> implementations such as MultiSegmentReader in that flushing will
> synchronize updates with IW in part by sharing the write lock. All
> methods of IR will be usable including reopen and clone. 

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message