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 C13E4200BFB for ; Wed, 28 Dec 2016 01:10:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BFDEF160B3D; Wed, 28 Dec 2016 00:10:29 +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 1303F160B31 for ; Wed, 28 Dec 2016 01:10:28 +0100 (CET) Received: (qmail 30104 invoked by uid 500); 28 Dec 2016 00:10:28 -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 30089 invoked by uid 99); 28 Dec 2016 00:10:28 -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, 28 Dec 2016 00:10:28 +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 816951A0020 for ; Wed, 28 Dec 2016 00:10:27 +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 Mxa-O_AuIr5F for ; Wed, 28 Dec 2016 00:10:26 +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 E838B5F46D for ; Wed, 28 Dec 2016 00:10:25 +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 uBS0AEOn012347; Wed, 28 Dec 2016 00:10:14 GMT Message-Id: <201612280010.uBS0AEOn012347@ip-10-146-233-104.ec2.internal> Date: Wed, 28 Dec 2016 00:10:14 +0000 From: "Alex Behm (Code Review)" To: Bharath Vissapragada , impala-cr@cloudera.com, reviews@impala.incubator.apache.org 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_IF_EXISTS=2E=0A?= X-Gerrit-Change-Id: Icb1f31eb2ecf05b9b51ef4e12e6bb78f44d0cf84 X-Gerrit-ChangeURL: X-Gerrit-Commit: 85b390d1bc44dc36df98363efdd600accc337283 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, 28 Dec 2016 00:10:29 -0000 Hello Bharath Vissapragada, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/5556 to look at the new patch set (#3). Change subject: IMPALA-3641: Fix catalogd RPC responses to DROP IF EXISTS. ...................................................................... IMPALA-3641: Fix catalogd RPC responses to DROP IF EXISTS. The main problem was that the catalogd's response to a some DROP IF EXISTS operations included a removed object that was applied to the requesting impalad's catalog cache. In particular, a DROP DATABASE 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 IF EXISTS 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, 77 insertions(+), 72 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/56/5556/3 -- 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: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Bharath Vissapragada