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 483FB200BF3 for ; Thu, 22 Dec 2016 00:04:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 46DBE160B39; Wed, 21 Dec 2016 23:04:12 +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 8F7E0160B26 for ; Thu, 22 Dec 2016 00:04:11 +0100 (CET) Received: (qmail 253 invoked by uid 500); 21 Dec 2016 23:04:10 -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 242 invoked by uid 99); 21 Dec 2016 23:04:10 -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, 21 Dec 2016 23:04:10 +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 F2999180B1E for ; Wed, 21 Dec 2016 23:04:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-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 R2JE9YrNRtCC for ; Wed, 21 Dec 2016 23:04:07 +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-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 230D05F24B for ; Wed, 21 Dec 2016 23:04:07 +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 uBLN46RO007138; Wed, 21 Dec 2016 23:04:06 GMT Message-Id: <201612212304.uBLN46RO007138@ip-10-146-233-104.ec2.internal> Date: Wed, 21 Dec 2016 23:04:06 +0000 From: "Alex Behm (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Bharath Vissapragada Reply-To: alex.behm@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3641=3A_Fix_catalogd_RPC_responses_to_DROP_TABLE/DATABASE=2E=0A?= X-Gerrit-Change-Id: Icb1f31eb2ecf05b9b51ef4e12e6bb78f44d0cf84 X-Gerrit-ChangeURL: X-Gerrit-Commit: e51fe9ae4e41db3d86bc9f61e538be0cf0003825 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.2 archived-at: Wed, 21 Dec 2016 23:04:12 -0000 Alex Behm has uploaded a new patch set (#2). Change subject: IMPALA-3641: Fix catalogd RPC responses to DROP TABLE/DATABASE. ...................................................................... IMPALA-3641: Fix catalogd RPC responses to DROP TABLE/DATABASE. The main problem was that the catalogd's response to a DROP TABLE/DATABASE always included a removed object that was applied to the requesting impalad's catalog cache. In particular, a DROP IF EXISTS that did not actually drop anything in the catalogd still returned the object name in the RPC response as a removed object with the *current* catalog version (i.e., without incrementing the catalog version). The above behavior lead to a situation where a drop of a non-existent object overwrote a legitimate entry in an impalad's CatalogDeltaLog. Recall that the version of the dropped object was based on the current catalog version at some point in time, e.g., the same version of a legitimate entry in the CatalogDeltaLog. As a reminder, the CatalogDeltaLog protects deletions from being undone via updates from the statestore. So overwriting an object in the CatalogDeltaLog can lead to a dropped object appearing again with certain timing of a statestore update. Please see the JIRA for an analysis of logging output that shows the bug and its effect. The fix is simple: The RPC response of a DROP TABLE/DATABASE should only contain a removed object if an object was actually removed from the catalogd. Testing: - Unfortunately, I have not been able to reproduce the issue locally despite vigorous attempts and despite knowing what the problem is. Our existing tests seem to reproduce the issue pretty reliably, so it's not clear whether a targeted test is feasible or needed. - An exhaustive test run passed. Change-Id: Icb1f31eb2ecf05b9b51ef4e12e6bb78f44d0cf84 --- M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java 2 files changed, 76 insertions(+), 72 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/56/5556/2 -- To view, visit http://gerrit.cloudera.org:8080/5556 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icb1f31eb2ecf05b9b51ef4e12e6bb78f44d0cf84 Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Bharath Vissapragada