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

Michael McCandless commented on LUCENE-1314:
--------------------------------------------

I'm seeing this failure:
{code}
[junit] Testcase: 
testCloneWriteToOrig(org.apache.lucene.index.TestIndexReaderClone):   FAILED
[junit] deleting from the original should not have worked
[junit] junit.framework.AssertionFailedError: deleting from the original should 
not have worked
[junit]         at 
org.apache.lucene.index.TestIndexReaderClone.testCloneWriteToOrig(TestIndexReaderClone.java:53)
[junit] 
[junit] 
[junit] Test org.apache.lucene.index.TestIndexReaderClone FAILED
{code}

I think that test just needs to be updated based on the new semantics?  Could 
you also test the reverse (that r2 is also able to do a delete, as long as r1 
hasn't).

And also this one:
{code}
[junit] Testcase: 
testNormsRefCounting(org.apache.lucene.index.TestIndexReaderCloneNorms):      
FAILED
[junit] did not hit expected exception
[junit] junit.framework.AssertionFailedError: did not hit expected exception
[junit]         at 
org.apache.lucene.index.TestIndexReaderCloneNorms.testNormsRefCounting(TestIndexReaderCloneNorms.java:179)
[junit] 
{code}

Which I think is failing for the same reason (changed semantics).

It seems like you also now allow non-readOnly reader to clone to a writable 
one?  Is there a test case for that?

Also can you make sure you always close MockRAMDir's that you opened (at least 
one test does not)?  On close it fails if there are still any open files, which 
is a good test that we are not over-incref'ing somewhere.

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