Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E70EEFB3E for ; Wed, 17 Apr 2013 02:16:15 +0000 (UTC) Received: (qmail 97217 invoked by uid 500); 17 Apr 2013 02:16:14 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 97117 invoked by uid 500); 17 Apr 2013 02:16:14 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 97052 invoked by uid 99); 17 Apr 2013 02:16:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Apr 2013 02:16:14 +0000 Date: Wed, 17 Apr 2013 02:16:13 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (IO-338) When a file is rotated, finish reading previous file prior to starting new one MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IO-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417938#comment-13417938 ] Sebb edited comment on IO-338 at 4/17/13 2:15 AM: -------------------------------------------------- What error did you get before you swapped IOUtils.closeQuietly for the inline code? I see now: when an active file is renamed, the reader RAF still points to the original file, but operations on the File variable will use the new file. (Luckily File#length() returns 0 if the file does not exist, so the code should not mind if it catches the window between rename and creation of the new file.) Why does the patch set last = 0? was (Author: sebb@apache.org): What error did you get before you swapped IOUtils.closeQuietly for the inline code? I see now: when an active file is renamed, the reader RAF still points to the original file, but operations on the File variable will use the new file. [Luckily File#length() returns 0 if the file does not exist, so the code should not mind if it catches the window between rename and creation of the new file.] Why does the patch set last = 0? > When a file is rotated, finish reading previous file prior to starting new one > ------------------------------------------------------------------------------ > > Key: IO-338 > URL: https://issues.apache.org/jira/browse/IO-338 > Project: Commons IO > Issue Type: Improvement > Components: Utilities > Reporter: Jonathan Creasy > Attachments: IO-338-trunk.patch > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira