Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 015B0D59E for ; Thu, 28 Jun 2012 04:13:49 +0000 (UTC) Received: (qmail 43997 invoked by uid 500); 28 Jun 2012 04:13:48 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 43634 invoked by uid 500); 28 Jun 2012 04:13:47 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 43572 invoked by uid 99); 28 Jun 2012 04:13:45 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2012 04:13:45 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 533D514283D for ; Thu, 28 Jun 2012 04:13:44 +0000 (UTC) Date: Thu, 28 Jun 2012 04:13:44 +0000 (UTC) From: "Hadoop QA (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <875638194.65355.1340856824343.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1062884776.59809.1340764064304.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HDFS-3574) Fix small race and do some cleanup in GetImageServlet 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/HDFS-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402828#comment-13402828 ] Hadoop QA commented on HDFS-3574: --------------------------------- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12533724/hdfs-3574.txt against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. -1 findbugs. The patch appears to introduce 2 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.fs.viewfs.TestViewFsTrash org.apache.hadoop.ha.TestZKFailoverController org.apache.hadoop.io.file.tfile.TestTFileByteArrays org.apache.hadoop.io.file.tfile.TestTFileJClassComparatorByteArrays org.apache.hadoop.hdfs.server.namenode.metrics.TestNameNodeMetrics org.apache.hadoop.hdfs.server.datanode.TestBPOfferService +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/2716//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/2716//artifact/trunk/patchprocess/newPatchFindbugsWarningshadoop-hdfs.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/2716//console This message is automatically generated. > Fix small race and do some cleanup in GetImageServlet > ----------------------------------------------------- > > Key: HDFS-3574 > URL: https://issues.apache.org/jira/browse/HDFS-3574 > Project: Hadoop HDFS > Issue Type: Bug > Components: name-node > Affects Versions: 3.0.0 > Reporter: Todd Lipcon > Assignee: Todd Lipcon > Priority: Minor > Attachments: hdfs-3574.txt, hdfs-3574.txt > > > There's a very small race window in GetImageServlet, if the following interleaving occurs: > - The Storage object returns some local file in the storage directory (eg an edits file or image file) > - *Race*: some other process removes the file > - GetImageServlet calls file.length() which returns 0, since it doesn't exist. It thus faithfully sets the Content-Length header to 0 > - getFileClient() throws FileNotFoundException when trying to open the file. But, since we call response.getOutputStream() before this, the headers have already been sent, so we fail to send the "404" or "500" response that we should. > Thus, the client sees a 0-length Content-Length followed by 0 lengths of content, and thinks it successfully has downloaded the target file, where in fact it downloads an empty one. > I saw this in practice during the "edits synchronization" phase of recovery while working on HDFS-3077, though it could apply on existing code paths, as well, I believe. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira