[ 
https://issues.apache.org/jira/browse/HIVE-14357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15395593#comment-15395593
 ] 

Rajat Khandelwal commented on HIVE-14357:
-----------------------------------------

[~ekoifman] Since you are the original author of this code, can you please take 
a look?

Reference commit: 
https://github.com/apache/hive/commit/47bf055c02990272753105b917b487c5bbfe9208
JIRA which introduced this code: HIVE-11848

> TestDbTxnManager2#testLocksInSubquery failing in branch-2.1
> -----------------------------------------------------------
>
>                 Key: HIVE-14357
>                 URL: https://issues.apache.org/jira/browse/HIVE-14357
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Rajat Khandelwal
>
> {noformat}
> checkCmdOnDriver(driver.compileAndRespond("insert into R select * from S 
> where a in (select a from T where b = 1)"));
>     txnMgr.openTxn("three");
>     txnMgr.acquireLocks(driver.getPlan(), ctx, "three");
>     locks = getLocks();
>     Assert.assertEquals("Unexpected lock count", 3, locks.size());
>     checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "T", null, 
> locks.get(0));
>     checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "S", null, 
> locks.get(1));
>     checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "R", null, 
> locks.get(2));
> {noformat}
> This test case is failing. The expected order of locks is supposed to be T, 
> S, R. But upon closer inspection, it seems to be R,S,T. 
> I'm not much familiar with what these locks are and why the order is 
> important. Raising this jira so while I try to understand it all. Meanwhile, 
> if somebody can explain here, would be helpful. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to