Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D66A511AB1 for ; Mon, 1 Sep 2014 21:41:21 +0000 (UTC) Received: (qmail 29971 invoked by uid 500); 1 Sep 2014 21:41:21 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 29863 invoked by uid 500); 1 Sep 2014 21:41:21 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 29845 invoked by uid 99); 1 Sep 2014 21:41:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2014 21:41:21 +0000 Date: Mon, 1 Sep 2014 21:41:20 +0000 (UTC) From: "Arpit Agarwal (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-6981) DN upgrade with layout version change should not use trash MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Arpit Agarwal created HDFS-6981: ----------------------------------- Summary: DN upgrade with layout version change should not use = trash Key: HDFS-6981 URL: https://issues.apache.org/jira/browse/HDFS-6981 Project: Hadoop HDFS Issue Type: Bug Components: datanode Affects Versions: 3.0.0 Reporter: James Thomas Post HDFS-6800, we can encounter the following scenario: # We start with DN software version -55 and initiate a rolling upgrade to v= ersion -56 # We delete some blocks, and they are moved to trash # We roll back to DN software version -55 using the -rollback flag =E2=80= =93 since we are running the old code (prior to this patch), we will restor= e the previous directory but will not delete the trash # We append to some of the blocks that were deleted in step 2 # We then restart a DN that contains blocks that were appended to =E2=80=93= since the trash still exists, it will be restored at this point, the appen= ded-to blocks will be overwritten, and we will lose the appended data So I think we need to avoid writing anything to the trash directory if we h= ave a previous directory. Thanks to [~james.thomas] for reporting this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)