You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/01/12 01:19:00 UTC

[jira] [Work logged] (HIVE-24363) Current order of transactional event listeners is prone to deadlock in backend DB connections

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

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

                Author: ASF GitHub Bot
            Created on: 12/Jan/21 01:18
            Start Date: 12/Jan/21 01:18
    Worklog Time Spent: 10m 
      Work Description: github-actions[bot] commented on pull request #1657:
URL: https://github.com/apache/hive/pull/1657#issuecomment-758329009


   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.


----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 534619)
    Time Spent: 2h 10m  (was: 2h)

> 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, HIVE-24363.02.patch
>
>          Time Spent: 2h 10m
>  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)