hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio Peña (JIRA) <>
Subject [jira] [Commented] (HIVE-18941) HMS non-transactional listener may be called in transactional context
Date Wed, 14 Mar 2018 17:50:00 GMT


Sergio Peña commented on HIVE-18941:

[~akolb] and for the person who will work on this issue. There is a logic on the MetaStoreListenerNotifier.notifyEvent()
methods that add a flag to the listener response parameters that specify whether such listener
is executed inside an active transaction or not. This was very useful for Sentry to detect
if some non-listener calls where indeed called inside a current transaction and ignore them
if they are.

The logic is like this:
if (ms != null) {
    event.putParameter(HIVE_METASTORE_TRANSACTION_ACTIVE, Boolean.toString(ms.isActiveTransaction()));
See the code:



> HMS non-transactional listener may be called in transactional context
> ---------------------------------------------------------------------
>                 Key: HIVE-18941
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 2.0.2, 3.0.0
>            Reporter: Alexander Kolbasov
>            Priority: Major
> When HMS code calls listeners it assumes that they are *not* called as part of the transaction.
This isn't quite true because of the nested transaction - it is quite possible that these
listeners are called as part of the bigger nested transaction. This causes several potential
> 1) It changes the assumptions about the context in which these listeners run
> 2) It creates possibilities for deadlocks
> 3) Some of these listeners may do relative long operations which may delay transaction
> [~spena] FYI.

This message was sent by Atlassian JIRA

View raw message