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 B1BDD200CA5 for ; Sat, 27 May 2017 03:30:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B019A160BC8; Sat, 27 May 2017 01:30:03 +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 03126160B9C for ; Sat, 27 May 2017 03:30:02 +0200 (CEST) Received: (qmail 35246 invoked by uid 500); 27 May 2017 01:30:01 -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 35227 invoked by uid 99); 27 May 2017 01:30:00 -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; Sat, 27 May 2017 01:30:00 +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 797981A02D9 for ; Sat, 27 May 2017 01:30:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=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 utLg0D5krN2e for ; Sat, 27 May 2017 01:29:58 +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 8F3495F2FD for ; Sat, 27 May 2017 01:29:57 +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 v4R1Tu9r032106; Sat, 27 May 2017 01:29:56 GMT Date: Sat, 27 May 2017 01:29:56 +0000 From: "Taras Bobrovytsky (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org Message-ID: Reply-To: tbobrovytsky@cloudera.com X-Gerrit-MessageType: newchange Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5355=3A_Fix_the_order_of_Sentry_roles_and_privileges=0A?= X-Gerrit-Change-Id: I7072e95b74952ce5a51ea1b6e2ae3e80fb0940e0 X-Gerrit-ChangeURL: X-Gerrit-Commit: f7f06744fc9bcf725203c82a5f3f2431995d073f 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: Sat, 27 May 2017 01:30:03 -0000 Taras Bobrovytsky has uploaded a new change for review. http://gerrit.cloudera.org:8080/7004 Change subject: IMPALA-5355: Fix the order of Sentry roles and privileges ...................................................................... IMPALA-5355: Fix the order of Sentry roles and privileges After a single Impalad is restarted, it is possible that order in which it receives roles and privileges from the statestore is incorrect. The correct order is for the role to appear first in the update, before the privilege that references it. If a user updates a role, it's catalog version number can become larger than the catalog numbers of the privileges that reference it. This causes the role to come after the privilege in the initial metastore update. We fix the issue by incrementing the catalog version of the privileges when a role is updated Testing: - Added a test that reproduced the problem. Change-Id: I7072e95b74952ce5a51ea1b6e2ae3e80fb0940e0 --- M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java M fe/src/main/java/org/apache/impala/catalog/Role.java A tests/authorization/test_impalad_restart.py 3 files changed, 89 insertions(+), 1 deletion(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/04/7004/1 -- To view, visit http://gerrit.cloudera.org:8080/7004 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7072e95b74952ce5a51ea1b6e2ae3e80fb0940e0 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Taras Bobrovytsky