Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 62283 invoked from network); 8 Sep 2010 21:30:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Sep 2010 21:30:14 -0000 Received: (qmail 28684 invoked by uid 500); 8 Sep 2010 21:30:12 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 28650 invoked by uid 500); 8 Sep 2010 21:30:12 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 28643 invoked by uid 99); 8 Sep 2010 21:30:12 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Sep 2010 21:30:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Sep 2010 21:29:54 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o88LTXUA010086 for ; Wed, 8 Sep 2010 21:29:33 GMT Message-ID: <25224250.85571283981373132.JavaMail.jira@thor> Date: Wed, 8 Sep 2010 17:29:33 -0400 (EDT) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2637) FSDirectory.copyBytes isn't safe for SimpleFSDirectory In-Reply-To: <33095631.75291283951973364.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-2637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907440#action_12907440 ] Uwe Schindler commented on LUCENE-2637: --------------------------------------- +1, this is in my opinion the only right solution. SimpleFSDir should never use NIO, to use NIO, use NIOFSDir, so transferTo and this NIO copy should only be there! > 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org