[
https://issues.apache.org/jira/browse/HIVE-10972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14590300#comment-14590300
]
Alan Gates commented on HIVE-10972:
-----------------------------------
I don't think this change is right. I agree that always locking the current
database is a bug. But the way the ZK lock manager works you do need to put a
lock on the database if your are locking a table in that db. (DbTxnManager
does not work this way). So it's fine to take out the code that locks the
current db. But you need to replace it with code that locks the appropriate
db. I don't see that code in the patch.
> DummyTxnManager always locks the current database in shared mode, which is
> incorrect.
> -------------------------------------------------------------------------------------
>
> Key: HIVE-10972
> URL: https://issues.apache.org/jira/browse/HIVE-10972
> Project: Hive
> Issue Type: Bug
> Components: Locking
> Affects Versions: 2.0.0
> Reporter: Aihua Xu
> Assignee: Aihua Xu
> Attachments: HIVE-10972.2.patch, HIVE-10972.patch
>
>
> In DummyTxnManager [line 163 |
> http://grepcode.com/file/repo1.maven.org/maven2/co.cask.cdap/hive-exec/0.13.0/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java#163],
> it always locks the current database.
> That is not correct since the current database can be "db1", and the query
> can be "select * from db2.tb1", which will lock db1 unnecessarily.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)