[ 
https://issues.apache.org/jira/browse/HIVE-28189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17836022#comment-17836022
 ] 

Yuping Fan commented on HIVE-28189:
-----------------------------------

[~zhangbutao] Yes, I enabled the ranger hive plugin. The error log is "caused 
by: java.sql.BatchUpdataException: Cannot delete or update a parent row: a 
foreign key constraint fails \{xxxx."tbl_col_privs", CONSTRAINT 
"TBL_COL_PRIVS_FKI" FOREIGN KEY ("TBL_ID") REFERENICES "tbls" ("TBL_ID")}", The 
error is occured on 
[https://github.com/apache/hive/blob/af7059e2bdc8b18af42e0b7f7163b923a0bfd424/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L9540]
 method. 

 

So, that's why i wanna lock the hive table while synchronizing privs data from 
Apache Ranger. I'm note that the PrivilegeSynchonizer is not enabled by 
default, but if it's enabled it has this issue. what do you think of?

> PrivilegeSynchonizer Need to lock the table while synchronizing privs data
> --------------------------------------------------------------------------
>
>                 Key: HIVE-28189
>                 URL: https://issues.apache.org/jira/browse/HIVE-28189
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 3.1.0
>            Reporter: Yuping Fan
>            Priority: Major
>
> Due to the large number of permissions, the synchronization time exceeds 1 
> minute. 
> If I delete this table during that 1 minute, it will cause the table to fail 
> to delete, with the error that the tbl_col_privs foreign key constraint check 
> failed. So I think the table should be locked when the permissions are 
> synchronized



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to