lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-743) IndexReader.reopen()
Date Tue, 30 Oct 2007 08:56:51 GMT


Michael McCandless commented on LUCENE-743:

Patch looks great!  I'm still working through it but found a few small

It might be good to put a "assert refCount > 0" at various places like
decRef(), incRef(), ensureOpen()?  That would require changing the
constructors to init refCount=1 rather than incRef() it to 1.

I'm seeing a failure in contrib/memory testcase:

    [junit] *********** FILE=./NOTICE.txt
    [junit] Fatal error at query=Apache, file=./NOTICE.txt, anal=org.apache.lucene.analysis.SimpleAnalyzer@341960
    [junit] ------------- ---------------- ---------------
    [junit] Testcase: testMany(org.apache.lucene.index.memory.MemoryIndexTest):	Caused an
    [junit] this IndexReader is closed
    [junit] this IndexReader is closed
    [junit] 	at org.apache.lucene.index.IndexReader.ensureOpen(
    [junit] 	at org.apache.lucene.index.IndexReader.termDocs(
    [junit] 	at$TermWeight.scorer(
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at org.apache.lucene.index.memory.MemoryIndexTest.query(
    [junit] 	at
    [junit] 	at org.apache.lucene.index.memory.MemoryIndexTest.testMany(

I think it's because MemoryIndexReader (private class in calls super(null) =
IndexReader.IndexReader(Directory) in its constructor, which does not
initialize the refCount to 1?  If I insert incRef() into
IndexReader.IndexReader(Directory) constructor, the test passes, but
who else is using that constructor (ie will this double-incref in
those cases?).

> IndexReader.reopen()
> --------------------
>                 Key: LUCENE-743
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Otis Gospodnetic
>            Assignee: Michael Busch
>            Priority: Minor
>             Fix For: 2.3
>         Attachments:, lucene-743-take2.patch, lucene-743-take3.patch,
lucene-743.patch, lucene-743.patch, lucene-743.patch,,,
> This is Robert Engels' implementation of IndexReader.reopen() functionality, as a set
of 3 new classes (this was easier for him to implement, but should probably be folded into
the core, if this looks good).

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:
For additional commands, e-mail:

View raw message