[
https://issues.apache.org/jira/browse/LUCENE-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040823#comment-13040823
]
Shai Erera commented on LUCENE-3147:
------------------------------------
Hmm ... I think checkpoint() is needed after all. After I committed to trunk, I
ran tests again on 3x before commit, and TestIndexWriter.testNoWaitClose failed:
{noformat}
[junit] Testsuite: org.apache.lucene.index.TestIndexWriter
[junit] Testcase: testNoWaitClose(org.apache.lucene.index.TestIndexWriter):
FAILED
[junit] IndexFileDeleter doesn't know about file _a6_1.del
[junit] junit.framework.AssertionFailedError: IndexFileDeleter doesn't know
about file _a6_1.del
[junit] at
org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1207)
[junit] at
org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1125)
[junit] at
org.apache.lucene.index.IndexWriter.filesExist(IndexWriter.java:4421)
[junit] at
org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4469)
[junit] at
org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:3354)
[junit] at
org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3425)
[junit] at
org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1870)
[junit] at
org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1813)
[junit] at
org.apache.lucene.index.TestIndexWriter.testNoWaitClose(TestIndexWriter.java:1515)
[junit]
[junit]
[junit] Tests run: 68, Failures: 1, Errors: 0, Time elapsed: 24.884 sec
[junit]
[junit] ------------- Standard Error -----------------
[junit] NOTE: reproduce with: ant test -Dtestcase=TestIndexWriter
-Dtestmethod=testNoWaitClose
-Dtests.seed=8584244356995777356:6228535864161192995
[junit] NOTE: test params are: locale=da_DK, timezone=America/Menominee
[junit] NOTE: all tests run in this JVM:
[junit] [TestClassicAnalyzer, TestPerFieldAnalzyerWrapper,
TestCharTermAttributeImpl, TestNumberTools, TestConcurrentMergeScheduler,
TestFilterIndexReader, TestIndexWriter]
[junit] NOTE: Windows 7 6.1 build 7600 amd64/IBM Corporation 1.6.0
(64-bit)/cpus=2,threads=3,free=1805128,total=34830336
[junit] ------------- ---------------- ---------------
[junit] TEST org.apache.lucene.index.TestIndexWriter FAILED
{noformat}
Reproduced it on 3x, not on trunk. closeMergeReaders is called from
commitMerge, which indeed calls checkpoint() afterwards unconditionally, but
also from mergeMiddle, in its finally block if (!success). And the exception
suggests that IFD does not know about a certain file, and checkpoint() calls
deleter.refresh. So I'll revert my change to trunk and call checkpoint() if
anyChanges + suppressExceptions. I don't want to change previous behavior.
> MockDirectoryWrapper should track open file handles of IndexOutput too
> ----------------------------------------------------------------------
>
> Key: LUCENE-3147
> URL: https://issues.apache.org/jira/browse/LUCENE-3147
> Project: Lucene - Java
> Issue Type: Test
> Components: general/test
> Reporter: Shai Erera
> Assignee: Shai Erera
> Priority: Minor
> Fix For: 3.2, 4.0
>
> Attachments: LUCENE-3147-3x.patch, LUCENE-3147.patch,
> LUCENE-3147.patch, LUCENE-3147.patch, LUCENE-3147.patch, LUCENE-3147.patch,
> LUCENE-3147.patch, LUCENE-3147.patch, LUCENE-3147.patch, LUCENE-3147.patch,
> LUCENE-3147.patch, LUCENE-3147.patch, LUCENE-3147.patch, LUCENE-3147.patch
>
>
> MockDirectoryWrapper currently tracks open file handles of IndexInput only.
> Therefore IO files that are not closed do not fail our tests, which can then
> lead to test directories fail to delete on Windows. We should make sure all
> open files are tracked and if they are left open, fail the test. I'll attach
> a patch shortly.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]