Fredy Wijaya has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/11794


Change subject: IMPALA-7760: Privilege version inconsistency causes a hang when 
running invalidate metadata
......................................................................

IMPALA-7760: Privilege version inconsistency causes a hang when running 
invalidate metadata

Before this patch, a bug in SentryProxy caused a hang when running
invalidate metadata due to privilege version inconsistency. I was able
to manually reproduce the issue by doing the following steps:

1. Get all Sentry role privileges for role a: [x, y] --> in SentryProxy
2. Add a sleep statement before getting all Sentry roles to simulate the
   timing issue--> in SentryProxy
3. Remove role a --> Externally via Sentry CLI
4. Privileges x and y in step 1 do not get removed in the catalog even
   those they were removed in step 3, which causes the catalog version
   inconsistency
5. Run invalidate metadata, this will cause it to hang due to catalog
   version inconsistency

The fix is to remove all privileges in the catalog if there are no
privileges (null or empty) returned by Sentry.

Testing:
- Manually tested the patch with by the above steps and did not
  encounter the hang  when issuing invalidate metadata.

Change-Id: Ib1e0db2b1f727476f489c732c4f4e5bc1582429f
---
M fe/src/main/java/org/apache/impala/util/SentryProxy.java
1 file changed, 0 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/94/11794/1
--
To view, visit http://gerrit.cloudera.org:8080/11794
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1e0db2b1f727476f489c732c4f4e5bc1582429f
Gerrit-Change-Number: 11794
Gerrit-PatchSet: 1
Gerrit-Owner: Fredy Wijaya <fwij...@cloudera.com>

Reply via email to