[
https://issues.apache.org/jira/browse/LUCENE-2637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907553#action_12907553
]
Robert Muir commented on LUCENE-2637:
-------------------------------------
bq. Robert, you've removed copyBytes from FSDirectory entirely
Yes, thats exactly what i did, as mentioned in my jira comment, with rationale.
bq. I thought, and it looks like Uwe thought so too, that it should be moved
to NIOFSDirectory, no? What's the point of having NIOFSDir if it cannot use NIO
API?
We had NIOFSDirectory in lucene 2.9/3.0 and it didnt have this optimization.
I think we should take the conservative approach at the moment, as mentioned in
my JIRA comment.
Optimizations like this need solid tests before being committed, above and
beyond this testRandomStoredFields
that only fails 1% of the time if the implementation is incorrect.
> 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
> Assignee: 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: [email protected]
For additional commands, e-mail: [email protected]