Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-2151 Automatically derive owner privileges from Hive Object Ownership
  3. SENTRY-2281

list_privileges_by_user() fails with a JDODetachedFieldAccessException

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • Sentry
    • None

    Description

      Caused by: java.lang.RuntimeException: Unknown error for request: TListSentryPrivilegesByAuthRequest(protocol_version:2, requestorUserName:ubuntu, authorizableSet:[TSentryAuthorizable(server:localhost, db:default, table:t1)], roleSet:TSentryActiveRoleSet(all:true, roles:[]), users:[ubuntu]), message: You have just attempted to access field "users" yet this field was not detached when you detached the object. Either dont access this field, or detach it when detaching the object.. Server Stacktrace: javax.jdo.JDODetachedFieldAccessException: You have just attempted to access field "users" yet this field was not detached when you detached the object. Either dont access this field, or detach it when detaching the object.
             at org.apache.sentry.provider.db.service.model.MSentryPrivilege.dnGetusers(MSentryPrivilege.java)
             at org.apache.sentry.provider.db.service.model.MSentryPrivilege.getUsers(MSentryPrivilege.java:186)
             at org.apache.sentry.provider.db.service.persistent.SentryStore.listSentryPrivilegesByAuthorizableForUser(SentryStore.java:2118)
             at org.apache.sentry.api.service.thrift.SentryPolicyStoreProcessor.list_sentry_privileges_by_authorizable(SentryPolicyStoreProcessor.java:1166)
             at org.apache.sentry.api.service.thrift.SentryPolicyService$Processor$list_sentry_privileges_by_authorizable.getResult(SentryPolicyService.java:1677)
             at org.apache.sentry.api.service.thrift.SentryPolicyService$Processor$list_sentry_privileges_by_authorizable.getResult(SentryPolicyService.java:1662)
             at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
             at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
             at org.apache.sentry.api.service.thrift.SentryProcessorWrapper.process(SentryProcessorWrapper.java:36)
             at org.apache.thrift.TMultiplexedProcessor.process(TMultiplexedProcessor.java:123)
             at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

      Attachments

        1. SENTRY-2281.01.patch
          5 kB
          Arjun Mishra
        2. SENTRY-2281.02.patch
          4 kB
          Arjun Mishra

        Issue Links

          Activity

            People

              arjunmishra13 Arjun Mishra
              spena Sergio Peña
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: