Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0E5E6200CA7 for ; Wed, 31 May 2017 02:49:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0CE0E160BDC; Wed, 31 May 2017 00:49:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 51CCE160BC9 for ; Wed, 31 May 2017 02:49:18 +0200 (CEST) Received: (qmail 74806 invoked by uid 500); 31 May 2017 00:49:17 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 74795 invoked by uid 99); 31 May 2017 00:49:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2017 00:49:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id BB71D1A9590 for ; Wed, 31 May 2017 00:49:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id KlvhMnY1_phI for ; Wed, 31 May 2017 00:49:15 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 150EA5F3FE for ; Wed, 31 May 2017 00:49:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v4V0nDQn005311; Wed, 31 May 2017 00:49:13 GMT Message-Id: <201705310049.v4V0nDQn005311@ip-10-146-233-104.ec2.internal> Date: Wed, 31 May 2017 00:49:13 +0000 From: "Joe McDonnell (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Michael Ho Reply-To: joemcdonnell@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5386=3A_Fix_ReopenCachedHdfsFileHandle_failure_case=0A?= X-Gerrit-Change-Id: Iee982fa5e964f6c8969b2eb7e5f3eca89e793b3a X-Gerrit-ChangeURL: X-Gerrit-Commit: 0d73e61eab8d99a23a803aa6e893765c4bf174ee In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Wed, 31 May 2017 00:49:19 -0000 Joe McDonnell has posted comments on this change. Change subject: IMPALA-5386: Fix ReopenCachedHdfsFileHandle failure case ...................................................................... Patch Set 2: > Did you look into the conditions which triggered the failure to > begin with ? Is there any way to trigger similar error locally with > debug action or stress flag ? It would be good to add a test for > this case. I know the sequence of events: 1. File is deleted using hdfs command line 2. Run a query over the table that has the deleted file 3. ScanRange::Open succeeds (!!) 4. ScanRange::Read tries hdfsRead and fails, destroys the file handle, and reopening the file handle fails. The ScanRange's file handle reference is now invalid, but it is also non-null. 5. Query is aborted, leading to ScanRange::Cancel 6. ScanRange::Cancel calls ScanRange::Close, which sees that the file handle reference is non-null and tries to release it. The release fails, because the file handle reference is invalid. The problem with reproducing this on normal Hdfs is that when a file is deleted, the subsequent Open in #2 fails, so the query never even has a file handle. If the Open succeeded, it is a file handle to a local file, so POSIX guarantees that the file stays around. I have tried modifying the code and modifying the test to produce this sequence, but it is difficult to get this particular combination. I'm looking at what it would take. -- To view, visit http://gerrit.cloudera.org:8080/7020 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee982fa5e964f6c8969b2eb7e5f3eca89e793b3a Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Joe McDonnell Gerrit-Reviewer: Joe McDonnell Gerrit-Reviewer: Michael Ho Gerrit-HasComments: No