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 6DF8D181E0 for ; Mon, 29 Feb 2016 23:01:19 +0000 (UTC) Received: (qmail 6480 invoked by uid 500); 29 Feb 2016 23:01:18 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 6260 invoked by uid 500); 29 Feb 2016 23:01:18 -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 6231 invoked by uid 99); 29 Feb 2016 23:01:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Feb 2016 23:01:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2B2822C1F56 for ; Mon, 29 Feb 2016 23:01:18 +0000 (UTC) Date: Mon, 29 Feb 2016 23:01:18 +0000 (UTC) From: "Jing Zhao (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-9876) shouldProcessOverReplicated should not count number of pending replicas MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jing Zhao created HDFS-9876: ------------------------------- Summary: shouldProcessOverReplicated should not count number of pending replicas Key: HDFS-9876 URL: https://issues.apache.org/jira/browse/HDFS-9876 Project: Hadoop HDFS Issue Type: Sub-task Reporter: Takuya Fukudome Assignee: Jing Zhao Currently when checking if we should process over-replicated block in {{addStoredBlock}}, we count both the number of reported replicas and pending replicas. However, {{processOverReplicatedBlock}} chooses excess replicas only among all the reported storages of the block. So in a situation where we have over-replicated replica/internal blocks which only reside in the pending queue, we will not be able to choose any extra replica to delete. For contiguous blocks, this causes {{chooseExcessReplicasContiguous}} to do nothing. But for striped blocks, this may cause endless loop in {{chooseExcessReplicasStriped}} in the following while loop: {code} while (candidates.size() > 1) { List replicasToDelete = placementPolicy .chooseReplicasToDelete(nonExcess, candidates, (short) 1, excessTypes, null, null); {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)