lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Rowe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index
Date Sat, 11 Jun 2011 03:59:58 GMT

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

Steven Rowe updated LUCENE-3188:
--------------------------------

    Attachment: LUCENE-3188.patch

Patch against branch_3x.

I converted Ivan's test class into a unit test.  Without Ivan's patch, the test fails, and
with the patch, it succeeds.

Here's the test failure I got without Ivan's patch:

{noformat}
org.apache.lucene.index.TestIndexSplitter,testDeleteThenOptimize
NOTE: reproduce with: ant test -Dtestcase=TestIndexSplitter -Dtestmethod=testDeleteThenOptimize
-Dtests.seed=5250008618328265481:-4070453331991284264
WARNING: test class left thread running: merge thread: _0(3.3):c2/1 into _0 [optimize]
RESOURCE LEAK: test class left 1 thread(s) running
Exception in thread "Lucene Merge Thread #0" NOTE: test params are: locale=es_BO, timezone=Australia/Tasmania
org.apache.lucene.util.ThreadInterruptedException: java.lang.InterruptedException: sleep interrupted
	at org.apache.lucene.index.ConcurrentMergeScheduler.handleMergeException(ConcurrentMergeScheduler.java:515)
	at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:482)
Caused by: java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at org.apache.lucene.index.ConcurrentMergeScheduler.handleMergeException(ConcurrentMergeScheduler.java:513)
	... 1 more
NOTE: all tests run in this JVM:
[TestIndexSplitter]
NOTE: Windows 7 6.1 amd64/Sun Microsystems Inc. 1.5.0_22 (64-bit)/cpus=4,threads=2,free=99874080,total=128057344

java.io.IOException: background merge hit exception: _0(3.3):c2/1 into _0 [optimize]
	at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2536)
	at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2474)
	at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2444)
	at org.apache.lucene.index.TestIndexSplitter.testDeleteThenOptimize(TestIndexSplitter.java:145)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1268)
	at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1186)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:192)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Caused by: java.io.IOException: MockDirectoryWrapper: file "_0.cfs" is still open: cannot
overwrite
	at org.apache.lucene.store.MockDirectoryWrapper.createOutput(MockDirectoryWrapper.java:360)
	at org.apache.lucene.index.CompoundFileWriter.close(CompoundFileWriter.java:167)
	at org.apache.lucene.index.SegmentMerger.createCompoundFile(SegmentMerger.java:137)
	at org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4242)
	at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3853)
	at org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:388)
	at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:456)
{noformat}

> The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct
index
> -------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3188
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.0, 3.2
>         Environment: Bug is present for all environments.
> I used in this case - Windows Server 2003, Java Hot Spot Virtual Machine.
>            Reporter: Ivan Dimitrov Vasilev
>            Priority: Minor
>             Fix For: 3.0, 3.2
>
>         Attachments: IndexSplitter.java, LUCENE-3188.patch, LUCENE-3188.patch, TestIndexSplitter.java
>
>
> When using the method IndexSplitter.split(File destDir, String[] segs) from the Lucene
cotrib directory (contrib/misc/src/java/org/apache/lucene/index) it creates an index with
segments descriptor file with wrong data. Namely wrong is the number representing the name
of segment that would be created next in this index.
> If some of the segments of the index already has this name this results either to impossibility
to create new segment or in crating of an corrupted segment.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message