You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ivan Dimitrov Vasilev (JIRA)" <ji...@apache.org> on 2011/06/10 11:28:58 UTC

[jira] [Created] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

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.2, 3.0
         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.2, 3.0


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


[jira] [Updated] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
     [ 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


[jira] [Updated] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Ivan Dimitrov Vasilev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Dimitrov Vasilev updated LUCENE-3188:
------------------------------------------

    Attachment: LUCENE-3188.patch

The file LUCENE-3188.patch contains the needed changes to IndexSplitter to fix this issue.

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


[jira] [Updated] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Fix Version/s:     (was: 3.2)
                       (was: 3.0)
                   4.0
                   3.3
         Assignee: Steven Rowe

> 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
>            Assignee: Steven Rowe
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>         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


[jira] [Updated] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-3188:
----------------------------------

    Attachment: LUCENE-3188-fix1.patch

Fix for the CheckIndex problem with empty indexes.

> 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
>            Assignee: Steven Rowe
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>         Attachments: IndexSplitter.java, LUCENE-3188-fix1.patch, LUCENE-3188.patch, 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


[jira] [Commented] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Ivan Dimitrov Vasilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047279#comment-13047279 ] 

Ivan Dimitrov Vasilev commented on LUCENE-3188:
-----------------------------------------------

Hi Steve,

I attached the patch to this issue as required from Apache (or at least I think so :) ).
I do not have lot of time now to read in depth Apache docs about the procedures when contributing but I saw on the wiki that I should provide also test cases that show the bug and they should be in form of unit tests. I provided a test case that is not in JUnit form but still works. As I saw when submitted patch the tests do not need granting license so you can use it. I do not have much time now because we are before release and this was one of the bugs that I should fix (and I did it).

I guess you are the one who discovered this Splitter. Thank you very much for this you saved me a lot of hard work because in our previous releases we used a class that generated segments descriptor file out of given segments and looking for content of this file was very difficult.

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


[jira] [Updated] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
     [ 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

Attachment with above-described changes.

I plan on committing shortly, then porting to trunk.

> 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
>            Assignee: Steven Rowe
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>         Attachments: IndexSplitter.java, LUCENE-3188.patch, 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


[jira] [Resolved] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler resolved LUCENE-3188.
-----------------------------------

    Resolution: Fixed

Committed fixes in revisions: 1134895 (trunk), 1134896 (3.x)

> 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
>            Assignee: Steven Rowe
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>         Attachments: IndexSplitter.java, LUCENE-3188-fix1.patch, LUCENE-3188.patch, 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


[jira] [Commented] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047900#comment-13047900 ] 

Steven Rowe commented on LUCENE-3188:
-------------------------------------

Mike McCandless reviewed for me; see [the IRC log|http://colabti.org/irclogger/irclogger_log/lucene-dev?date=2011-06-11#l45].  

In summary: This is a bug, and the fix is appropriate.  The problem is that the split index is created with an incorrect next-segment-name counter (always 0).  A simpler fix than Ivan's would be to copy the counter over from the source index.  Also, it would be good to include a check for this problem to the CheckIndex tool:

bq. mikemccand: ie it'd just verify sis.counter is > all segs in the index

I'll make a patch with these changes.


> 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
>            Assignee: Steven Rowe
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>         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


[jira] [Updated] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Ivan Dimitrov Vasilev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Dimitrov Vasilev updated LUCENE-3188:
------------------------------------------

    Attachment: IndexSplitter.java
                TestIndexSplitter.java

The attached file TestIndexSplitter.java contains test that shows the bug (when running IndexSplitter from contrib) and the fix (when running IndexSplitter that is attached here as a patch)

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


[jira] [Resolved] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Rowe resolved LUCENE-3188.
---------------------------------

    Resolution: Fixed

Committed:
- r1134823: branch_3x
- r1134829: trunk

Thanks Ivan!

> 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
>            Assignee: Steven Rowe
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>         Attachments: IndexSplitter.java, LUCENE-3188.patch, 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


[jira] [Commented] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047245#comment-13047245 ] 

Steven Rowe commented on LUCENE-3188:
-------------------------------------

This is a better Wikipedia article on (source code) patching than the one I gave above: http://en.wikipedia.org/wiki/Patch_%28Unix%29

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


[jira] [Commented] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048370#comment-13048370 ] 

Steven Rowe commented on LUCENE-3188:
-------------------------------------

Thanks Uwe.  I didn't see the problem because I didn't run all tests before committing.

> 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
>            Assignee: Steven Rowe
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>         Attachments: IndexSplitter.java, LUCENE-3188-fix1.patch, LUCENE-3188.patch, 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


[jira] [Reopened] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler reopened LUCENE-3188:
-----------------------------------


Reopen: The CheckIndex patch reports broken index if you have empty index without segments.

> 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
>            Assignee: Steven Rowe
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>         Attachments: IndexSplitter.java, LUCENE-3188-fix1.patch, LUCENE-3188.patch, 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


[jira] [Commented] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047164#comment-13047164 ] 

Steven Rowe commented on LUCENE-3188:
-------------------------------------

Hi Ivan,

Your submissions should be in the form of a patch (for an explanation see e.g. http://en.wikipedia.org/wiki/Patch_%28computing%29).  To generate a patch, after you make modifications in a locally checked-out Subversion working copy, use the shell command "svn diff" at the top level, and redirect its output to a file named for the issue you want to attach to, with extension ".patch", e.g.: {{svn diff > ../LUCENE-3188.patch}}.

Also, when you attached the two files to this issue, you did not click on the radio button next to the text "Grant license to ASF for inclusion in ASF works (as per the Apache License ยง5)".  You must do this for the Lucene project to be able to use code you contribute.  When you attach your patch, please click on the radio button indicating you grant license to the ASF.  (I haven't looked at your code yet for this reason.)

Steve

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


[jira] [Commented] (LUCENE-3188) The class from cotrub directory org.apache.lucene.index.IndexSplitter creates a non correct index

Posted by "Steven Rowe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047354#comment-13047354 ] 

Steven Rowe commented on LUCENE-3188:
-------------------------------------

{quote}
I attached the patch to this issue as required from Apache (or at least I think so ).
I do not have lot of time now to read in depth Apache docs about the procedures when contributing but I saw on the wiki that I should provide also test cases that show the bug and they should be in form of unit tests. I provided a test case that is not in JUnit form but still works. As I saw when submitted patch the tests do not need granting license so you can use it. I do not have much time now because we are before release and this was one of the bugs that I should fix (and I did it).
{quote}

Thanks for reporting and providing a patch.  I can take it from here.

bq. I guess you are the one who discovered this Splitter.

I think you have me confused with someone else :) - Jason Rutherglen wrote it: LUCENE-1959.

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