[
https://issues.apache.org/jira/browse/HIVE-17150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099191#comment-16099191
]
Sergio Peña commented on HIVE-17150:
------------------------------------
It creates more than one notification per operation. One for CREATE_TABLE and
another for CREATE_INDEX. These 2 notifications are not duplicated as they're
in the same transaction. However, if another thread writes a new notification,
then the EVENT_ID will be duplicated if it grabs the ID before committing the
CREATE_INDEX operation.
Currently, only CREATE_INDEX calls a CREATE_TABLE inside the same transaction.
> CREATE INDEX execute HMS out-of-transaction listener calls inside a
> transaction
> -------------------------------------------------------------------------------
>
> Key: HIVE-17150
> URL: https://issues.apache.org/jira/browse/HIVE-17150
> Project: Hive
> Issue Type: Bug
> Components: Metastore
> Affects Versions: 2.3.0
> Reporter: Sergio Peña
> Assignee: Sergio Peña
> Fix For: 3.0.0, 2.4.0
>
> Attachments: HIVE-17150.1.patch, HIVE-17150.2.patch
>
>
> The problem with CREATE INDEX is that it calls a CREATE TABLE operation
> inside the same CREATE INDEX transaction. During listener calls, there are
> some listeners that should run in an out-of-transaction context, for
> instance, Sentry blocks the HMS operation until the DB log notification is
> processed, but if the transaction has not finished, then the
> out-of-transaction listener will block forever (or until a read-time out
> happens).
> A fix would be to add a parameter to the out-of-transaction listener that
> alerts the listener if HMS is in an active transaction. If so, then is up to
> the listener plugin to return immediately and avoid blocking the HMS
> operation.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)