On Wed, Sep 8, 2010 at 10:32 AM, Michael McCandless <
[email protected]> wrote:

> OK indeed I can repro the bug if I force the test to use
> SimpleFSDir!!!  Yuck.  This copyBytes opto is deadly.
>
> I'll fix the test to use newDirectory(random)...
>
> Mike
>
>
yes, the reason for this problem is we didnt completely cutover all tests to
use newDirectory(random).

I did a find/replace for tests using RAMDirectory, but didnt look at ones
that explicitly use FSDirectory.
We should be on the lookout for these, and most of the time they should use
newDirectory instead.

otherwise we end up with situations like this, where the tests always pass
on unix but not on windows.

the patch I put on https://issues.apache.org/jira/browse/LUCENE-2637 fixes
the problem by pushing the copyBytes optimization up to NIOFSDirectory, but
I'm not comfortable with the fact that i dont understand why the copyBytes
optimization is ok for NIOFSDirectory, but not ok for SimpleFSDirectory.

-- 
Robert Muir
[email protected]

Reply via email to