Reply
New Contributor
Posts: 2
Registered: ‎02-26-2018

[CDH 5.14.0] ERROR: duplicate key value violates unique constraint "AUTHZOBJNAMEID"

Hello,

 

Since upgrading CDH from 5.12.1 to 5.14.0, we usually have issues with Sentry such as:

 

 

ERROR DataNucleus.Datastore.Persist: Update of object "org.apache.sentry.provider.db.service.model.MAuthzPathsMapping@7ed4377" using statement "UPDATE "AUTHZ_PATHS_MAPPING" SET "AUTHZ_OBJ_NAME"=? WHERE "AUTHZ_OBJ_ID"=?" failed : org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "AUTHZOBJNAMEID"
Detail: Key ("AUTHZ_OBJ_NAME", "AUTHZ_SNAPSHOT_ID")=(database.tablename, 372) already exists.

 

WARN org.apache.sentry.provider.db.service.persistent.TransactionManager: Transaction execution encountered exception
javax.jdo.JDODataStoreException: Update of object "org.apache.sentry.provider.db.service.model.MAuthzPathsMapping@7785b31f" using statement "UPDATE "AUTHZ_PATHS_MAPPING" SET "AUTHZ_OBJ_NAME"=? WHERE "AUTHZ_OBJ_ID"=?" failed : org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "AUTHZOBJNAMEID"
Detail: Key ("AUTHZ_OBJ_NAME", "AUTHZ_SNAPSHOT_ID")=(database.tablename, 372) already exists.

 

Hive metasore server fails when the Sentry error occures. Deleting the records related to this table in "AUTHZ_PATHS_MAPPING" and "AUTHZ_PATH" unblocks Sentry synchronisation.

 

Thanks in advance.

 

Announcements