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 32C7F200C1C for ; Wed, 1 Feb 2017 00:04:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2EC7D160B5F; Tue, 31 Jan 2017 23:04:47 +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 778A1160B52 for ; Wed, 1 Feb 2017 00:04:46 +0100 (CET) Received: (qmail 60950 invoked by uid 500); 31 Jan 2017 23:04:45 -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 60938 invoked by uid 99); 31 Jan 2017 23:04:45 -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; Tue, 31 Jan 2017 23:04:45 +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 1CD261A02FF for ; Tue, 31 Jan 2017 23:04:45 +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-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id f6T57jUJ1WN0 for ; Tue, 31 Jan 2017 23:04:42 +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 EEEBC5F239 for ; Tue, 31 Jan 2017 23:04:41 +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 v0VN4fqD002851; Tue, 31 Jan 2017 23:04:41 GMT Date: Tue, 31 Jan 2017 23:04:41 +0000 From: "Matthew Jacobs (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org Message-ID: Reply-To: mj@cloudera.com X-Gerrit-MessageType: newchange Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4828=3A_Alter_Kudu_schema_outside_Impala_may_crash_on_read=0A?= X-Gerrit-Change-Id: I6d43f5bb9811e728ad592933066d006c8fb4553a X-Gerrit-ChangeURL: X-Gerrit-Commit: ab9b6a4d944f92fb2a4b7457fc3b839d0e673d9d 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: Tue, 31 Jan 2017 23:04:47 -0000 Matthew Jacobs has uploaded a new change for review. http://gerrit.cloudera.org:8080/5840 Change subject: IMPALA-4828: Alter Kudu schema outside Impala may crash on read ...................................................................... IMPALA-4828: Alter Kudu schema outside Impala may crash on read Creating a table in Impala, changing the column schema outside of Impala, and then reading again in Impala may result in a crash. Neither Impala nor the Kudu client validates the schema immediately before reading, so Impala may attempt to dereference pointers that aren't there. This happens if a string column is dropped and then a new, non string column is added with the old string column's name. This change adds validation after opening a scan token to ensure the projection schema matches the expected schema. The scan is guaranteed to be valid while the KuduScanner is open, even if the schema changes concurrently. Testing: Adds a test case that previously would crash Impala. Change-Id: I6d43f5bb9811e728ad592933066d006c8fb4553a --- M be/src/exec/kudu-scanner.cc M be/src/exec/kudu-scanner.h M be/src/exec/kudu-util.cc M be/src/exec/kudu-util.h M be/src/runtime/descriptors.h M common/thrift/generate_error_codes.py M tests/query_test/test_kudu.py 7 files changed, 99 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/40/5840/1 -- To view, visit http://gerrit.cloudera.org:8080/5840 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d43f5bb9811e728ad592933066d006c8fb4553a Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Matthew Jacobs