From hdfs-issues-return-218145-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Apr 25 08:27:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B5A62180676 for ; Wed, 25 Apr 2018 08:27:04 +0200 (CEST) Received: (qmail 22358 invoked by uid 500); 25 Apr 2018 06:27:03 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 22346 invoked by uid 99); 25 Apr 2018 06:27:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2018 06:27:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8F3A4180119 for ; Wed, 25 Apr 2018 06:27:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 7n5cFVM036V0 for ; Wed, 25 Apr 2018 06:27:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 7CD3A5FBEE for ; Wed, 25 Apr 2018 06:27:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E0418E10D6 for ; Wed, 25 Apr 2018 06:27:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 98A35241C6 for ; Wed, 25 Apr 2018 06:27:00 +0000 (UTC) Date: Wed, 25 Apr 2018 06:27:00 +0000 (UTC) From: "Rakesh R (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-13165) [SPS]: Collects successfully moved block details via IBR MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-13165?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1645= 1722#comment-16451722 ]=20 Rakesh R commented on HDFS-13165: --------------------------------- Based on [~surendrasingh]'s vote and I believe no objection on the IBR rela= ted changes, am planning to commit the latest IBR patch(without datanode bl= ock move changes) to the branch. I'd like to finish the bulk changes amap a= nd simultaneously will try to reach consensus on the datanode protocol part= . > [SPS]: Collects successfully moved block details via IBR > -------------------------------------------------------- > > Key: HDFS-13165 > URL: https://issues.apache.org/jira/browse/HDFS-13165 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: Rakesh R > Assignee: Rakesh R > Priority: Major > Attachments: HDFS-13165-HDFS-10285-00.patch, HDFS-13165-HDFS-1028= 5-01.patch, HDFS-13165-HDFS-10285-02.patch, HDFS-13165-HDFS-10285-03.patch,= HDFS-13165-HDFS-10285-04.patch, HDFS-13165-HDFS-10285-05.patch, HDFS-13165= -HDFS-10285-06.patch, HDFS-13165-HDFS-10285-07.patch, HDFS-13165-HDFS-10285= -08.patch, HDFS-13165-HDFS-10285-09.patch > > > This task to make use of the existing IBR to get moved block details and = remove unwanted future tracking logic exists in BlockStorageMovementTracker= code, this is no more needed as the file level tracking maintained at NN i= tself. > Following comments taken from HDFS-10285, [here|https://issues.apache.org= /jira/browse/HDFS-10285?focusedCommentId=3D16347472&page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel#comment-16347472] > Comment-3) > {quote}BPServiceActor > Is it actually sending back the moved blocks? Aren=E2=80=99t IBRs suffici= ent?{quote} > Comment-21) > {quote} > BlockStorageMovementTracker > Many data structures are riddled with non-threadsafe race conditions and = risk of CMEs. > Ex. The moverTaskFutures map. Adding new blocks and/or adding to a block'= s list of futures is synchronized. However the run loop does an unsynchroni= zed block get, unsynchronized future remove, unsynchronized isEmpty, possib= ly another unsynchronized get, only then does it do a synchronized remove o= f the block. The whole chunk of code should be synchronized. > Is the problematic moverTaskFutures even needed? It's aggregating futures= per-block for seemingly no reason. Why track all the futures at all instea= d of just relying on the completion service? As best I can tell: > It's only used to determine if a future from the completion service shoul= d be ignored during shutdown. Shutdown sets the running boolean to false an= d clears the entire datastructure so why not use the running boolean like a= check just a little further down? > As synchronization to sleep up to 2 seconds before performing a blocking = moverCompletionService.take, but only when it thinks there are no active fu= tures. I'll ignore the missed notify race that the bounded wait masks, but = the real question is why not just do the blocking take? > Why all the complexity? Am I missing something? > BlocksMovementsStatusHandler > Suffers same type of thread safety issues as StoragePolicySatisfyWorker. = Ex. blockIdVsMovementStatus is inconsistent synchronized. Does synchronize = to return an unmodifiable list which sadly does nothing to protect the call= er from CME. > handle is iterating over a non-thread safe list. > {quote} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org