[ 
https://issues.apache.org/jira/browse/HIVE-24363?focusedWorklogId=510324&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-510324
 ]

ASF GitHub Bot logged work on HIVE-24363:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Nov/20 16:45
            Start Date: 11/Nov/20 16:45
    Worklog Time Spent: 10m 
      Work Description: pkumarsinha commented on a change in pull request #1657:
URL: https://github.com/apache/hive/pull/1657#discussion_r521492511



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
##########
@@ -571,9 +571,12 @@ public void init() throws MetaException {
       listeners = 
MetaStoreServerUtils.getMetaStoreListeners(MetaStoreEventListener.class, conf,
           MetastoreConf.getVar(conf, ConfVars.EVENT_LISTENERS));
       listeners.add(new SessionPropertiesListener(conf));
-      transactionalListeners = 
MetaStoreServerUtils.getMetaStoreListeners(TransactionalMetaStoreEventListener.class,
-          conf, MetastoreConf.getVar(conf, 
ConfVars.TRANSACTIONAL_EVENT_LISTENERS));
-      transactionalListeners.add(new AcidEventListener(conf));
+      transactionalListeners = new ArrayList() {{

Review comment:
       @pgaref  Thanks for the review. 
   Currently, there are just two impl for transnational event listener in Hive 
. Out of that, AcidEventLisner is hard-coded to be included. The other one, 
DbNotificationListener is the one which will ideally end up getting configured 
if user choose  to do so. So the idea was,  unless a user writes a custom 
transnational event listener, this config can have at most one value as of now. 
Let me know your opinion with this context.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 510324)
    Time Spent: 1h 40m  (was: 1.5h)

> Current order of transactional event listeners is prone to deadlock in 
> backend DB connections
> ---------------------------------------------------------------------------------------------
>
>                 Key: HIVE-24363
>                 URL: https://issues.apache.org/jira/browse/HIVE-24363
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Pravin Sinha
>            Assignee: Pravin Sinha
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-24363.01.patch
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Currently the AcidEventListener is added to the end of list of transactional 
> event listeners. When DbNotificationListener is configured as 
> 'hive.metastore.transactional.event.listeners'. The final list will be formed 
> as :
> {"DbNotificationListener" , "AcidEventListener"}
> This will result in backend DB lock acquisition in this order:
> {code:java}
>  lock(a) {
>         // perform some op on a
>         lock(b) {
>           // perform some op on b
>         }
>   }
> {code}
> On the other hand, there are some HMS API say for example commit_txn(), which 
> calls the TxnHandler method directly, followed by DbNotificationListener 
> processing. Which will result in the lock acquisition in reverse order:
> {code:java}
> lock(b) {
>     // perform some op on b        
>     lock(a) {
>         // perform some op on a
>     }   
>  }
> {code}
> Note: 'a' and 'b' above are backend  DB lock and not jvm locks.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to