lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2637) FSDirectory.copyBytes isn't safe for SimpleFSDirectory
Date Wed, 08 Sep 2010 15:44:34 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907263#action_12907263
] 

Mark Miller commented on LUCENE-2637:
-------------------------------------

After testing this a lot for backing up indexes in Solr, I never found a super compelling
speed benefit to NIO byte copying (and I think its actually a hit on some Windows systems).

In the end, after trying to get an NIO win for too long, we gave up and went back to straight
old stream copying.

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


Mime
View raw message