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

Jason Rutherglen commented on LUCENE-1314:
------------------------------------------

I executed on Eclipse Mac OS X on a 4 core box (core's significant due to the 
threads).  I ran TestIndexReaderReopen.testThreadSafety 2 times in debug mode 
it worked, thought that debug mode wasn't making the bug reproduce so tried 
just running the test and it passed again.  The 5th time it gave an error in 
debug mode.  The test case fails consistently when SegmentReader.reopenSegment 
success == false and decRef is called afterwards in the finally clause.  It 
seems that calling this decRef on the newly cloned object is causing the 
assertion error which is possibly related to threading.  Probably because the 
decRef on the failed clone is decrementing one too many times on a 
deletedDocsRef used by another reader and causing the following assertion 
error.  I'm not sure if this is a real bug or an issue that the test case 
should ignore.  

{code}
java.lang.AssertionError
        at 
org.apache.lucene.index.SegmentReader$Ref.decRef(SegmentReader.java:104)
        at org.apache.lucene.index.SegmentReader.decRef(SegmentReader.java:249)
        at 
org.apache.lucene.index.MultiSegmentReader.doClose(MultiSegmentReader.java:413)
        at org.apache.lucene.index.IndexReader.decRef(IndexReader.java:157)
        at org.apache.lucene.index.IndexReader.close(IndexReader.java:990)
        at 
org.apache.lucene.index.TestIndexReaderReopen$9.run(TestIndexReaderReopen.java:703)
        at 
org.apache.lucene.index.TestIndexReaderReopen$ReaderThread.run(TestIndexReaderReopen.java:818)
{code}

> IndexReader.clone
> -----------------
>
>                 Key: LUCENE-1314
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1314
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Index
>    Affects Versions: 2.3.1
>            Reporter: Jason Rutherglen
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, 
> LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, 
> LUCENE-1314.patch, LUCENE-1314.patch, lucene-1314.patch, lucene-1314.patch, 
> lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, 
> lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, 
> lucene-1314.patch, lucene-1314.patch
>
>
> Based on discussion 
> http://www.nabble.com/IndexReader.reopen-issue-td18070256.html.  The problem 
> is reopen returns the same reader if there are no changes, so if docs are 
> deleted from the new reader, they are also reflected in the previous reader 
> which is not always desired behavior.

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

Reply via email to