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

Robert Muir updated LUCENE-2637:
--------------------------------

    Attachment: LUCENE-2637.patch

OK, here is my updated patch.

After thinking about this a lot:
* I removed all copyBytes optimizations completely.
* I don't care if the performance improves with NIO, if it causes corrupt 
indexes, its not worth it.
* I spent a ton of time debugging this, and although i can't make the previous 
patch i uploaded to this issue fail (that shoves the opto only into 
NIOFSDirectory), I feel given the issues from LUCENE-2239, given the fact this 
optimization causes index corruption (and has before), that the best thing to 
do is remove it entirely.

I'd like to commit this soon, and notify the lists that any windows users of 
trunk/3x should reindex since they might have index corruption.

I don't give the wrong impression, we should welcome optimizations to things 
like this, but only with solid tests, and I don't feel our suite of tests is 
mature enough to support this yet.


> FSDirectory.copyBytes isn't safe for SimpleFSDirectory
> ------------------------------------------------------
>
>                 Key: LUCENE-2637
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2637
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 3.1, 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-2637.patch, LUCENE-2637.patch
>
>
> the copyBytes optimization from LUCENE-2574 is not safe for 
> SimpleFSDirectory, but works fine for NIOFSDirectory.
> With SimpleFSDirectory, the copyBytes optimization causes index corruption.
> see 
> http://www.lucidimagination.com/search/document/36d2dbfc691909d5/bug_triggered_by_testindexwriter_testrandomstoredfields
>  for background
> here are my steps to reproduce (most of the time, at least on windows):
> {noformat}
> 1. edit line 87 of TestIndexWriter to plugin the seed:
>     random = newRandom(3312389322103990899L);
> 2. edit line 5138 of TestIndexWriter to force SimpleFSDirectory:
>     Directory dir = new SimpleFSDirectory(index);
> 3. run this command:
>     ant clean test-core -Dtestcase=TestIndexWriter
> -Dtestmethod=testRandomStoredFields -Dtests.iter=10
> -Dtests.codec="MockVariableIntBlock(29)"
> {noformat}

-- 
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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to