[
https://issues.apache.org/jira/browse/HIVE-28189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17835761#comment-17835761
]
Yuping Fan commented on HIVE-28189:
-----------------------------------
[~zhangbutao] Thanks for replay, unfortunately it's hard to reproduce, I can
talk about the logic.
Firstly, when i drop a table named `testa` , when the code execution to the
lines of the next line of
[https://github.com/apache/hive/blob/af7059e2bdc8b18af42e0b7f7163b923a0bfd424/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L1406]
, If permission synchronization happens at this time, table `tbl_col_privs` is
writing data at this time, however, the code that checks the tbl_col_privs
table for data has finished executing, so the data in the tbl_col_privs will
not be cleared at this time. Finally, when deleting the `tbls` table, an
external constraint error is displayed
> 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)