You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2009/06/19 17:30:07 UTC

[jira] Updated: (LUCENE-1639) intermittent failure in TestIndexWriter. testRandomIWReader

     [ https://issues.apache.org/jira/browse/LUCENE-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-1639:
---------------------------------------

    Attachment: LUCENE-1639.patch

OK I tracked this one down... in certain cases, IndexWriter would 1)
open a SegmentReader without doc stores (when merging, but doc stores
not being merged), 2) clone that SegmentReader to be readOnly (merging
requires point-in-time snapshot, ie, so deletions don't change during
the merge), and then 3) by the time the merge actually got started it
became necessary to merge docStores (because deletions snuck in before
the cloning could finish) so 4) we ask those clones to open the doc
stores.

SegmentReader and its clone then have separate doc store IndexInputs
open, and then when both are closed, one set of doc stores fails to be
closed.

It was simple to fix: when the clone wants to open doc stores, we
first as the original to do the open, then carry over the cloned
copies.

I plan to commit shortly.


> intermittent failure in TestIndexWriter. testRandomIWReader
> -----------------------------------------------------------
>
>                 Key: LUCENE-1639
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1639
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: LUCENE-1639.patch
>
>
> Rarely, this test (which was added with LUCENE-1516) fails in MockRAMDirectory.close because some files were not closed, eg:
> {code}
>    [junit] NOTE: random seed of testcase 'testRandomIWReader' was: -5001333286299627079
>    [junit] ------------- ---------------- ---------------
>    [junit] Testcase: testRandomIWReader(org.apache.lucene.index.TestStressIndexing2):        Caused an ERROR
>    [junit] MockRAMDirectory: cannot close: there are still open files: {_cq.tvx=3, _cq.fdx=3, _cq.tvf=3, _cq.tvd=3, _cq.fdt=3}
>    [junit] java.lang.RuntimeException: MockRAMDirectory: cannot close: there are still open files: {_cq.tvx=3, _cq.fdx=3, _cq.tvf=3, _cq.tvd=3, _cq.fdt=3}
>    [junit]     at org.apache.lucene.store.MockRAMDirectory.close(MockRAMDirectory.java:292)
>    [junit]     at org.apache.lucene.index.TestStressIndexing2.testRandomIWReader(TestStressIndexing2.java:66)
>    [junit]     at org.apache.lucene.util.LuceneTestCase.runTest(LuceneTestCase.java:88)
> {code}

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