Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-573

Fix NPE caused when rename op is applied on authzObject with no explicit permissions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:

      Description

      Steps to reproduce :

      1) Create some role 't1_admin'
      2) Grant ALL on database 'default' to role 't1_admin'
      3) Create table 't1' in 'default' db
      4) Rename table 't1' to 't2'
      5) Observe NPE in Namenode logs :

      java.lang.NullPointerException
              at org.apache.sentry.hdfs.UpdateableAuthzPermissions.applyPrivilegeUpdates(UpdateableAuthzPermissions.java:130)
              at org.apache.sentry.hdfs.UpdateableAuthzPermissions.applyPartialUpdate(UpdateableAuthzPermissions.java:89)
              at org.apache.sentry.hdfs.UpdateableAuthzPermissions.updatePartial(UpdateableAuthzPermissions.java:73)
              at org.apache.sentry.hdfs.SentryAuthorizationInfo.processUpdates(SentryAuthorizationInfo.java:167)
              at org.apache.sentry.hdfs.SentryAuthorizationInfo.update(SentryAuthorizationInfo.java:133)
              at org.apache.sentry.hdfs.SentryAuthorizationInfo.run(SentryAuthorizationInfo.java:183)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

        1. SENTRY-573.1.patch
          4 kB
          Arun Suresh

          Activity

            People

            • Assignee:
              asuresh Arun Suresh
              Reporter:
              asuresh Arun Suresh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: